diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index f6f8adc72a..a559f46ebb 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7951,6 +7951,15 @@ xlog_redo(XLogReaderState *record) ereport(PANIC, (errmsg("unexpected timeline ID %u (should be %u) in end-of-recovery record", xlrec.ThisTimeLineID, replayTLI))); + /* + * Update the control file so that crash recovery can follow the timeline + * changes to this point. + */ + LWLockAcquire(ControlFileLock, LW_EXCLUSIVE); + ControlFile->minRecoveryPoint = lsn; + ControlFile->minRecoveryPointTLI = xlrec.ThisTimeLineID; + UpdateControlFile(); + LWLockRelease(ControlFileLock); } else if (info == XLOG_NOOP) {