Skip to content

Commit d8b094d

Browse files
committed
Print WAL position correctly in pg_rewind error message.
This has been wrong ever since pg_rewind was added. The if-branch just above this, where we print the same error with an extra message supplied by XLogReadRecord() got this right, but the variable name was wrong in the else-branch. As a consequence, the error printed the WAL position as 0/0 if there was an error reading a WAL file. Backpatch to 9.5, where pg_rewind was added.
1 parent 14ef15a commit d8b094d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/bin/pg_rewind/parsexlog.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ extractPageMap(const char *datadir, XLogRecPtr startpoint, int tliIndex,
8989
errormsg);
9090
else
9191
pg_fatal("could not read WAL record at %X/%X",
92-
(uint32) (startpoint >> 32),
93-
(uint32) (startpoint));
92+
(uint32) (errptr >> 32), (uint32) (errptr));
9493
}
9594

9695
extractPageInfo(xlogreader);

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