From: | "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "Lonni J Friedman *EXTERN*" <netllama(at)gmail(dot)com>, "Parkirat Bagga" <parkiratbagga(at)gmail(dot)com> |
Cc: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Streaming Replication (Master Delta Sync) |
Date: | 2012-10-18 08:05:48 |
Message-ID: | D960CB61B694CF459DCFB4B0128514C208902834@exadv11.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2012-10-18 08:10:57 | Re: Postgresql switch over process |
Previous Message | teyking2003 | 2012-10-18 08:03:10 | Database in psql |