mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08: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:
parent
6d06049493
commit
6c4f6664b2
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user