|From:||Andres Freund <andres(at)2ndquadrant(dot)com>|
|To:||pgsql-hackers(at)postgresql(dot)org, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndQuadrant(dot)com>|
|Subject:||recovery_target_action doesn't work for anything but shutdown|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Unless I'm missing something recovery_target_action = promote/pause
There's the following block of code in readRecoveryCommandFile():
* 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 &&
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?
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
|Next Message||Andres Freund||2015-03-12 14:53:54||Re: recovery_target_action doesn't work for anything but shutdown|
|Previous Message||Amit Kapila||2015-03-12 14:46:18||Re: Parallel Seq Scan|