mirror of
https://github.com/postgres/postgres.git
synced 2025-06-04 00:02:37 -04:00
Rely only on checkpoint 1 at end of recovery.
Searching for checkpoint 2 (previous) is not correct in all cases. Bug report from Heikki Linnakangas
This commit is contained in:
parent
e1c1e21732
commit
072521b8c8
@ -5777,7 +5777,13 @@ StartupXLOG(void)
|
|||||||
if (fast_promote)
|
if (fast_promote)
|
||||||
{
|
{
|
||||||
checkPointLoc = ControlFile->prevCheckPoint;
|
checkPointLoc = ControlFile->prevCheckPoint;
|
||||||
record = ReadCheckpointRecord(xlogreader, checkPointLoc, 2, false);
|
|
||||||
|
/*
|
||||||
|
* Confirm the last checkpoint is available for us to recover
|
||||||
|
* from if we fail. Note that we don't check for the secondary
|
||||||
|
* checkpoint since that isn't available in most base backups.
|
||||||
|
*/
|
||||||
|
record = ReadCheckpointRecord(xlogreader, checkPointLoc, 1, false);
|
||||||
if (record != NULL)
|
if (record != NULL)
|
||||||
{
|
{
|
||||||
checkpoint_wait = false;
|
checkpoint_wait = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user