Re: [GENERAL] Shared WAL archive between master and standby: WALs notalways identical

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [GENERAL] Shared WAL archive between master and standby: WALs notalways identical
Дата
Msg-id CAKFQuwbTO7A_UA_hKx7SqzoGYhBvEJpiw+qrvS4eTpups1P2dA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Shared WAL archive between master and standby: WALs notalways identical  (Sasa Vilic <sasavilic@gmail.com>)
Список pgsql-general
On Mon, Feb 27, 2017 at 7:32 PM, Sasa Vilic <sasavilic@gmail.com> wrote:

My general idea is to have synchronous hot standby and asynchronous shared wal archive. If that were possible I could actually switch back and forth between master and slave without interrupting wal stream and with very short downtime. This also makes PostgreSQL upgrade very easy. Alternative to this is to have separate backup for master and slave, but this has other disadvantages:

* I need double disk space for backup if I am going to archive WALs from standby and master at the same time, or
* I could only archive WALs from current master, but that would require performing base backup immediately after failover. Otherwise archived WALs are useless. 


I became a bit skeptical when I re​ad:

"To get a complete series of WAL files in the archive, you must ensure that all WAL is archived, before it reaches the standby. This is inherently true with file-based log shipping, as the standby can only restore files that are found in the archive, but not if streaming replication is enabled."

given the lack of any hint as to how one would accomplish "a complete series of WAL files in the archive" in streaming replication mode...

Maybe I'm just missing something here - but it does seem like you don't get to have your cake and eat it...

Dave

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

Предыдущее
От: Sasa Vilic
Дата:
Сообщение: Re: [GENERAL] Shared WAL archive between master and standby: WALs notalways identical
Следующее
От: dhanuj hippie
Дата:
Сообщение: [GENERAL] pg_xlog keeps growing