aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/xlog.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 1d1e47b588c..5df6063be99 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -8415,6 +8415,13 @@ CreateRestartPoint(int flags)
KeepLogSeg(endptr, &_logId, &_logSeg);
PrevLogSeg(_logId, _logSeg);
+
+ /*
+ * Update ThisTimeLineID to the recovery target timeline, so that
+ * we install any recycled segments on the correct timeline.
+ */
+ ThisTimeLineID = GetRecoveryTargetTLI();
+
RemoveOldXlogFiles(_logId, _logSeg, endptr);
/*