Content-Length: 264056 | pFad | http://github.com/postgrespro/postgres/commit/85d0e661aae656d3ec710dab24f883c4b4ef90da

E0 Make recovery_target_action = pause work. · postgrespro/postgres@85d0e66 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/85d0e661aae656d3ec710dab24f883c4b4ef90da

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy