Re: BUG #13770: Extending recovery_min_apply_delay on Standby causes it to be unavailable for a while

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #13770: Extending recovery_min_apply_delay on Standby causes it to be unavailable for a while
Дата
Msg-id CAB7nPqTYS51+ySZTUi32QVz0o1zcLDV_bO1BAtCON-7HeZwkMQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #13770: Extending recovery_min_apply_delay on Standby causes it to be unavailable for a while  (Greg Clough <greg@gclough.com>)
Ответы Re: BUG #13770: Extending recovery_min_apply_delay on Standby causes it to be unavailable for a while  (Greg Clough <greg@gclough.com>)
Re: BUG #13770: Extending recovery_min_apply_delay on Standby causes it to be unavailable for a while  (Andres Freund <andres@anarazel.de>)
Список pgsql-bugs
On Mon, Dec 21, 2015 at 7:44 PM, Greg Clough <greg@gclough.com> wrote:
> I didn't see any response to this, and I do believe it's an actual
> PostgreSQL bug... or at least a case of undesirable undocumented behaviour.
>
> SHORT SUMMARY:  If you are using a Standby with recovery_min_apply_delay =
> 1h and you increase it to 24h, then your Standby will be unavailable for the
> next 23h.
>
> Could someone confirm my diagnosis?

When recovery_min_apply_delay is set, replay should wait for the delay
defined in the case of a COMMIT or COMMIT PREPARED record, and this
even if the minimum recovery point ensuring that standby is in a
consistent state on is not reached. In short, if there is a COMMIT
before the standby thinks that it has reached a consistent state to
allow read-only queries, which is what you are looking for, your
application won't be able to connect to the standby, and the feature
behaves correctly.

Depending on the use cases, it may be interesting to have a switch
allowing to not apply the delay should a consistent point not be
reached though...
--
Michael

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #13822: Slave terminated - WAL contains references to invalid page
Следующее
От: Tim Hutt
Дата:
Сообщение: Re: BUG #13832: Syntax errors are extremely unfriendly