diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2019-07-30 21:14:14 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2019-07-30 21:14:51 +0300 |
commit | ee3f036861228f3d85cd9cbb8d158f7209770ccd (patch) | |
tree | eabb0894d0a6c6e55b60dd91851434cb0683e1aa | |
parent | d452d0cf6fd37bc7a59f9604a4ad06a2d86cf44e (diff) | |
download | postgresql-ee3f036861228f3d85cd9cbb8d158f7209770ccd.tar.gz postgresql-ee3f036861228f3d85cd9cbb8d158f7209770ccd.zip |
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.
-rw-r--r-- | src/bin/pg_rewind/parsexlog.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bin/pg_rewind/parsexlog.c b/src/bin/pg_rewind/parsexlog.c index 2081cf8bd33..a5d1a5dddde 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, TimeLineID tli, 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); |