提交 85d0e661 编写于 作者: F Fujii Masao

Make recovery_target_action = pause work.

Previously even if recovery_target_action was set to pause and
the recovery target was reached, the recovery could never be paused.
Because the setting of pause was *always* overridden with that of
shutdown unexpectedly. This override is valid and intentional
if hot_standby is not enabled because there is no way to resume
the paused recovery in this case and the setting of pause is
completely useless. But not if hot_standby is enabled.

This patch changes the code so that the setting of pause is overridden
with that of shutdown only when hot_standby is not enabled.

Bug reported by Andres Freund
上级 a6a66bd6
...@@ -5141,8 +5141,8 @@ readRecoveryCommandFile(void) ...@@ -5141,8 +5141,8 @@ readRecoveryCommandFile(void)
*/ */
if (recoveryTargetAction == RECOVERY_TARGET_ACTION_PAUSE && if (recoveryTargetAction == RECOVERY_TARGET_ACTION_PAUSE &&
recoveryTargetActionSet && recoveryTargetActionSet &&
standbyState == STANDBY_DISABLED) !EnableHotStandby)
recoveryTargetAction = RECOVERY_TARGET_ACTION_SHUTDOWN; recoveryTargetAction = RECOVERY_TARGET_ACTION_SHUTDOWN;
/* Enable fetching from archive recovery area */ /* Enable fetching from archive recovery area */
ArchiveRecoveryRequested = true; ArchiveRecoveryRequested = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册