Re: Streaming replication and WAL archive interactions

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Streaming replication and WAL archive interactions
Дата
Msg-id 20150131130717.GN24213@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Streaming replication and WAL archive interactions  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Ответы Re: [HACKERS] Streaming replication and WAL archive interactions  (Миша Тюрин <tmihail@bk.ru>)
Список pgsql-hackers
Hi,

On 2014-12-19 22:56:40 +0200, Heikki Linnakangas wrote:
> This add two new archive_modes, 'shared' and 'always', to indicate whether
> the WAL archive is shared between the primary and standby, or not. In
> shared mode, the standby tracks which files have been archived by the
> primary. The standby refrains from recycling files that the primary has
> not yet archived, and at failover, the standby archives all those files too
> from the old timeline. In 'always' mode, the standby's WAL archive is
> taken to be separate from the primary's, and the standby independently
> archives all files it receives from the primary.

I don't really like this approach. Sharing a archive is rather dangerous
in my experience - if your old master comes up again (and writes in the
last wal file) or similar, you can get into really bad situations.

What I was thinking about was instead trying to detect the point up to
which files were safely archived by running restore command to check for
the presence of archived files. Then archive anything that has valid
content and isn't yet archived. That doesn't sound particularly
complicated to me.

Greetings,

Andres Freund



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Safe memory allocation functions
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: TABLESAMPLE patch