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 CAKFQuwaPScLY4vCKa3pZX=Y=Ria4nM9P2auBd65SuNURwzjmkw@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 6:33 PM, Sasa Vilic <sasavilic@gmail.com> wrote:
Hi David,

thanks for the answer. I read this in documentation but here there is a corner case that I am not sure how to handle:
"""
This requires more care in the archive_command, as it must be careful to not overwrite an existing file with different contents, but return success if the exactly same file is archived twice.
"""
But what I am supposed to do when content differs? Still return success and ignore or return error? If I return error, wouldn't that prevent wal archiver slave from pushing further WALs?


​As Adrian said - I'm not seeing the point to even dealing with a shared archive.  My solution would be to avoid the problem completely by pointing the standby WAL elsewhere.

That said, if I was a guessing man, I would say that, yes, you indicate failure.  The file in question will exist within the archive and will contain the contents from the master.  The standby's view of the file would be discarded.​

"as it must be careful to not overwrite an existing file with different contents, but return success if the exactly same file is archived twice." - the unspoken flip side is not returning true if the "not overwrite" provision took precedence.

David J.

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

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