aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 790e2c8714d..0ff9af53fef 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7610,7 +7610,10 @@ StartupXLOG(void)
}
else
CreateCheckPoint(CHECKPOINT_END_OF_RECOVERY | CHECKPOINT_IMMEDIATE);
+ }
+ if (ArchiveRecoveryRequested)
+ {
/*
* And finally, execute the recovery_end_command, if any.
*/
@@ -7618,10 +7621,7 @@ StartupXLOG(void)
ExecuteRecoveryCommand(recoveryEndCommand,
"recovery_end_command",
true);
- }
- if (ArchiveRecoveryRequested)
- {
/*
* We switched to a new timeline. Clean up segments on the old
* timeline.