Skip to content

Commit 85d0e66

Browse files
committed
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
1 parent a6a66bd commit 85d0e66

File tree

1 file changed

+2
-2
lines changed
  • src/backend/access/transam

1 file changed

+2
-2
lines changed

src/backend/access/transam/xlog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5141,8 +5141,8 @@ readRecoveryCommandFile(void)
51415141
*/
51425142
if (recoveryTargetAction == RECOVERY_TARGET_ACTION_PAUSE &&
51435143
recoveryTargetActionSet &&
5144-
standbyState == STANDBY_DISABLED)
5145-
recoveryTargetAction = RECOVERY_TARGET_ACTION_SHUTDOWN;
5144+
!EnableHotStandby)
5145+
recoveryTargetAction = RECOVERY_TARGET_ACTION_SHUTDOWN;
51465146

51475147
/* Enable fetching from archive recovery area */
51485148
ArchiveRecoveryRequested = true;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy