recovery_target_action doesn't work for anything but shutdown

Поиск
Список
Период
Сортировка
От Andres Freund
Тема recovery_target_action doesn't work for anything but shutdown
Дата
Msg-id 20150312145202.GD20199@awork2.anarazel.de
обсуждение исходный текст
Ответы Re: recovery_target_action doesn't work for anything but shutdown  (Andres Freund <andres@2ndquadrant.com>)
Re: recovery_target_action = pause & hot_standby = off  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
Hi,

Unless I'm missing something recovery_target_action = promote/pause
don't work.

There's the following block of code in readRecoveryCommandFile():/* * Override any inconsistent requests. Not that this
isa change * of behaviour in 9.5; prior to this we simply ignored a request * to pause if hot_standby = off, which was
surprisingbehaviour. */if (recoveryTargetAction == RECOVERY_TARGET_ACTION_PAUSE &&    recoveryTargetActionSet &&
standbyState== STANDBY_DISABLED)    recoveryTargetAction = RECOVERY_TARGET_ACTION_SHUTDOWN;
 

the problem is that when the recovery command file is read standbyState
will always still be STANDBY_DISABLED. Which makes sense, because we
can't even know we're in recovery before readRecoveryCommandFile().

I guess what you actually intended to test was StandbyModeRequested?

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Parallel Seq Scan
Следующее
От: Andres Freund
Дата:
Сообщение: Re: recovery_target_action doesn't work for anything but shutdown