pgsql: Fix determination of broken LSN in OVERWRITTEN_CONTRECORD - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: Fix determination of broken LSN in OVERWRITTEN_CONTRECORD
Date
Msg-id E1mqdS6-00073G-GU@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix determination of broken LSN in OVERWRITTEN_CONTRECORD

In commit ff9f111bce24 I mixed up inconsistent definitions of the LSN of
the first record in a page, when the previous record ends exactly at the
page boundary.  The correct LSN is adjusted to skip the WAL page header;
I failed to use that when setting XLogReaderState->overwrittenRecPtr,
so at WAL replay time VerifyOverwriteContrecord would refuse to let
replay continue past that record.

Backpatch to 10.  9.6 also contains this bug, but it's no longer being
maintained.

Discussion: https://postgr.es/m/45597.1637694259@sss.pgh.pa.us

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d24dac9549067716f5b4d8e44ccf87dd5274bfcd

Modified Files
--------------
src/backend/access/transam/xlogreader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pgsql: xlog.c: Remove global variables ReadRecPtr and EndRecPtr.
Next
From: Alvaro Herrera
Date:
Subject: pgsql: Document units for max_slot_wal_keep_size