diff options
-rw-r--r-- | src/backend/access/transam/xlog.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 0694128e1ed..859df783e6b 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -8259,6 +8259,13 @@ CreateRestartPoint(int flags) endptr = GetWalRcvWriteRecPtr(NULL); 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); /* |