Skip to content

Commit ca60f0c

Browse files
committed
Fix thinko in previous commit.
We must still initialize minRecoveryPoint if we start straight with archive recovery, e.g when recovering from a normal base backup taken with pg_start/stop_backup. Otherwise we never consider the system consistent.
1 parent ee8b95e commit ca60f0c

File tree

1 file changed

+6
-0
lines changed
  • src/backend/access/transam

1 file changed

+6
-0
lines changed

src/backend/access/transam/xlog.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6580,6 +6580,12 @@ StartupXLOG(void)
65806580
ControlFile->prevCheckPoint = ControlFile->checkPoint;
65816581
ControlFile->checkPoint = checkPointLoc;
65826582
ControlFile->checkPointCopy = checkPoint;
6583+
if (InArchiveRecovery)
6584+
{
6585+
/* initialize minRecoveryPoint if not set yet */
6586+
if (XLByteLT(ControlFile->minRecoveryPoint, checkPoint.redo))
6587+
ControlFile->minRecoveryPoint = checkPoint.redo;
6588+
}
65836589

65846590
/*
65856591
* Set backupStartPoint if we're starting recovery from a base backup.

0 commit comments

Comments
 (0)