pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix determination of broken LSN in OVERWRITTEN_CONTRECORD
Date: Fri, 26 Nov 2021 15:47:54 +0000
Message-ID: <E1mqdS6-00073O-I2@gemulon.postgresql.org> (raw)

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_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/72cf39d51ade63954c868bfe93996b4be7a79bf5

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



view thread (6+ messages)  latest in thread

Message-ID: <E1mqdS6-00073O-I2@gemulon.postgresql.org>
Permalink:  ../E1mqdS6-00073O-I2@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mqdS6-00073O-I2@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Fix determination of broken LSN in OVERWRITTEN_CONTRECORD
  In-Reply-To: <E1mqdS6-00073O-I2@gemulon.postgresql.org>
  References: <E1mqdS6-00073O-I2@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox