Re: recovery_target_action = pause & hot_standby = off

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: recovery_target_action = pause & hot_standby = off
Дата
Msg-id CABUevEzZaXqMzTryrEo1Z8dmQgbmL0bh6tVHvSQqyTqfmn9Wkw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: recovery_target_action = pause & hot_standby = off  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: recovery_target_action = pause & hot_standby = off  (Petr Jelinek <petr@2ndquadrant.com>)
Re: recovery_target_action = pause & hot_standby = off  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On Sun, Mar 15, 2015 at 2:27 PM, Andres Freund <andres@2ndquadrant.com> wrote:
On 2015-03-12 15:52:02 +0100, Andres Freund wrote:
>       /*
>        * Override any inconsistent requests. Not that this is a change
>        * of behaviour in 9.5; prior to this we simply ignored a request
>        * to pause if hot_standby = off, which was surprising behaviour.
>        */
>       if (recoveryTargetAction == RECOVERY_TARGET_ACTION_PAUSE &&
>               recoveryTargetActionSet &&
>               standbyState == STANDBY_DISABLED)
>               recoveryTargetAction = RECOVERY_TARGET_ACTION_SHUTDOWN;

While it's easy enough to fix I rather dislike the whole intent here
though. *Silently* switching the mode of operation in a rather
significant way seems like a bad idea to me. At the very least we need
to emit a LOG message about this; but I think it'd be much better to
error out instead.

<9.5's behaviour was already quite surprising. But changing things to a
different surprising behaviour seems like a bad idea.

+1. Especially for "sensitive" operations like this, having predictable-behavior-or-error is usually the best choice.

--

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: recovery_target_action = pause & hot_standby = off
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Add shutdown_at_recovery_target option to recovery.conf