mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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.
This commit is contained in:
@ -5265,6 +5265,15 @@ StartupXLOG(void)
|
||||
ControlFile->prevCheckPoint = ControlFile->checkPoint;
|
||||
ControlFile->checkPoint = checkPointLoc;
|
||||
ControlFile->checkPointCopy = checkPoint;
|
||||
if (InArchiveRecovery)
|
||||
{
|
||||
/* initialize minRecoveryPoint if not set yet */
|
||||
if (ControlFile->minRecoveryPoint < checkPoint.redo)
|
||||
{
|
||||
ControlFile->minRecoveryPoint = checkPoint.redo;
|
||||
ControlFile->minRecoveryPointTLI = checkPoint.ThisTimeLineID;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Set backupStartPoint if we're starting recovery from a base backup.
|
||||
|
Reference in New Issue
Block a user