pgsql: Fix wal_consistency_checking enhanced desc output.

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix wal_consistency_checking enhanced desc output.
Date: 2023-04-19 17:43:03
Message-ID: E1ppBpe-003s3e-KP@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)bowt(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2023-04-19 19:15:32 pgsql: Use nbtdesc "level" field name consistently.
Previous Message Tom Lane 2023-04-19 14:50:02 pgsql: Add missed case for tab completion of GRANT/REVOKE MAINTAIN.