Re: Streaming Replication (Master Delta Sync)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lonni J Friedman wrote:
>> Does rsysc sync's the partial logs as well. As I would be doing the rsync
>> from old master to new master (when the old master recovers), there might be
>> some partial logs present in the old master?
> 
> I don't think that's how WAL works.  The log is either complete, or it
> doesn't exist.  Anyway, rsync will sync whatever exists when invoked.
> I'm sure that its got some crazy options to exclude files based on
> certain criteria if you wanted to investigate them.

It's not true that a WAL is either complete or nonexistent.

We should distinguish between active WALs (in pg_xlog) and archived WALs.

Active WALs are not necessarily complete - there is always one that
is being written to and hence incomplete.
Archived WALs are always complete, but unless the postmaster on the
primary is down, it could be that rsync copies a partial WAL archive
that is just being written.

Still the advice to rsync WALs is right.  That will allow the standby
to catch up as much as possible.  An incomplete active WAL is no problem,
it will be recovered as far as possible.

>> Delay is there because both the machines are on cloud and they are in
>> different regions. I was thinking in terms of having multiple connections so
>> that the transfer between 2 regions may become faster.

There is always only one connection.
Is the change rate on the database high?
A silly question: are the clocks on primary and standby fairly in sync
or may it be time skew between those machines that you observe?

Yours,
Laurenz Albe

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux