pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix wal_consistency_checking enhanced desc output.
Date: Wed, 19 Apr 2023 17:43:03 +0000
Message-ID: <E1ppBpe-003s3e-KP@gemulon.postgresql.org> (raw)

Fix wal_consistency_checking enhanced desc output.

Recent enhancements to rmgr desc routines that made the output summarize
certain block data (added by commits 7d8219a4 and 1c453cfd) dealt with
records that lack relevant block data (and so have nothing to give a
more detailed summary of) by testing !DecodedBkpBlock.has_image.  As a
result, more detailed descriptions of block data were not output when
wal_consistency_checking was enabled.

This bug affected records with summarizable block data that also
happened to have an FPI that the REDO routine isn't supposed to apply
(FPIs used for consistency checking purposes only).  The presence of
such an FPI was incorrectly taken to indicate the absence of block data.

To fix, test DecodedBkpBlock.has_data, not !DecodedBkpBlock.has_image.
This is the exact condition that we care about, not an inexact proxy.

Author: Peter Geoghegan <pg@bowt.ie>
Discussion: https://postgr.es/m/CAH2-Wzm5Sc9cBg1qWV_cEBfLNJCrW9FjS-SoHVt8FLA7Ldn8yg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/50547a3fae0ce62e74c1d2175c7949937f2c69fc

Modified Files
--------------
src/backend/access/rmgrdesc/heapdesc.c | 8 ++++----
src/backend/access/rmgrdesc/nbtdesc.c  | 4 ++--
src/include/access/xlogreader.h        | 2 ++
3 files changed, 8 insertions(+), 6 deletions(-)



Message-ID: <E1ppBpe-003s3e-KP@gemulon.postgresql.org>
Permalink:  ../E1ppBpe-003s3e-KP@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ppBpe-003s3e-KP@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: pg@bowt.ie, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix wal_consistency_checking enhanced desc output.
  In-Reply-To: <E1ppBpe-003s3e-KP@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