Commit d8b094da authored by Heikki Linnakangas's avatar Heikki Linnakangas

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.
parent 14ef15a2
...@@ -89,8 +89,7 @@ extractPageMap(const char *datadir, XLogRecPtr startpoint, int tliIndex, ...@@ -89,8 +89,7 @@ extractPageMap(const char *datadir, XLogRecPtr startpoint, int tliIndex,
errormsg); errormsg);
else else
pg_fatal("could not read WAL record at %X/%X", pg_fatal("could not read WAL record at %X/%X",
(uint32) (startpoint >> 32), (uint32) (errptr >> 32), (uint32) (errptr));
(uint32) (startpoint));
} }
extractPageInfo(xlogreader); extractPageInfo(xlogreader);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment