postgres.git / summary / log / commit / refs
commit 35fc44b58c10ab9cb581ff0b5b51b7653fd7523f
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Tue Jul 30 18:14:14 2019 +0000
First released in: 13.0, 9.5.19, 9.6.15, 10.10, 11.5, 12.0
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.
src/bin/pg_rewind/parsexlog.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/bin/pg_rewind/parsexlog.c b/src/bin/pg_rewind/parsexlog.c
index 1befdbdeea3..df1879246cb 100644
--- a/src/bin/pg_rewind/parsexlog.c
+++ b/src/bin/pg_rewind/parsexlog.c
@@ -89,8 +89,7 @@ extractPageMap(const char *datadir, XLogRecPtr startpoint, int tliIndex,
errormsg);
else
pg_fatal("could not read WAL record at %X/%X\n",
- (uint32) (startpoint >> 32),
- (uint32) (startpoint));
+ (uint32) (errptr >> 32), (uint32) (errptr));
}
extractPageInfo(xlogreader);
[parent: 859b3003de87]