Re: Streaming Replication (Master Delta Sync)

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Streaming Replication (Master Delta Sync)
Дата
Msg-id D960CB61B694CF459DCFB4B0128514C208902834@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: Streaming Replication (Master Delta Sync)  (Lonni J Friedman <netllama@gmail.com>)
Ответы Re: Streaming Replication (Master Delta Sync)  (Parkirat Bagga <parkiratbagga@gmail.com>)
Список 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

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Albe Laurenz"
Дата:
Сообщение: Re: WAL corruption while replication
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: Postgresql switch over process