https://github.com/postgres/postgres
Revision 72af71aad9ce541ecea67ceaa7961ca39f89f227 authored by Jeff Davis on 18 August 2022, 21:23:59 UTC, committed by Jeff Davis on 18 August 2022, 21:23:59 UTC
Usage of ReadNextXLogRecord()'s first_record parameter for error
reporting isn't always correct. For instance, in GetWALRecordsInfo()
and GetWalStats(), we're reading multiple records, and first_record
is always passed as the LSN of the first record which is then used
for error reporting for later WAL record read failures. This isn't
correct.

The correct parameter to use for error reports in case of WAL
reading failures is xlogreader->EndRecPtr. This change fixes it.

While on it, removed an unnecessary Assert in pg_walinspect code.

Reported-by: Robert Haas
Author: Bharath Rupireddy
Reviewed-by: Robert Haas
Discussion: https://www.postgresql.org/message-id/CA%2BTgmoZAOGzPUifrcZRjFZ2vbtcw3mp-mN6UgEoEcQg6bY3OVg%40mail.gmail.com
Backpatch-through: 15
1 parent 2a42c1c
History
Tip revision: 72af71aad9ce541ecea67ceaa7961ca39f89f227 authored by Jeff Davis on 18 August 2022, 21:23:59 UTC
Use correct LSN for error reporting in pg_walinspect
Tip revision: 72af71a
File Mode Size
config
contrib
doc
src
.cirrus.yml -rw-r--r-- 17.7 KB
.dir-locals.el -rw-r--r-- 730 bytes
.editorconfig -rw-r--r-- 183 bytes
.git-blame-ignore-revs -rw-r--r-- 9.5 KB
.gitattributes -rw-r--r-- 1.4 KB
.gitignore -rw-r--r-- 504 bytes
COPYRIGHT -rw-r--r-- 1.2 KB
GNUmakefile.in -rw-r--r-- 4.1 KB
HISTORY -rw-r--r-- 277 bytes
Makefile -rw-r--r-- 1.8 KB
README -rw-r--r-- 1.2 KB
README.git -rw-r--r-- 721 bytes
aclocal.m4 -rw-r--r-- 397 bytes
configure -rwxr-xr-x 581.6 KB
configure.ac -rw-r--r-- 86.5 KB

README

back to top