Skip to content

Commit 072521b

Browse files
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
1 parent e1c1e21 commit 072521b

File tree

1 file changed

+7
-1
lines changed
  • src/backend/access/transam

1 file changed

+7
-1
lines changed

src/backend/access/transam/xlog.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5777,7 +5777,13 @@ StartupXLOG(void)
57775777
if (fast_promote)
57785778
{
57795779
checkPointLoc = ControlFile->prevCheckPoint;
5780-
record = ReadCheckpointRecord(xlogreader, checkPointLoc, 2, false);
5780+
5781+
/*
5782+
* Confirm the last checkpoint is available for us to recover
5783+
* from if we fail. Note that we don't check for the secondary
5784+
* checkpoint since that isn't available in most base backups.
5785+
*/
5786+
record = ReadCheckpointRecord(xlogreader, checkPointLoc, 1, false);
57815787
if (record != NULL)
57825788
{
57835789
checkpoint_wait = false;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy