pgsql: Fix wal_consistency_checking enhanced desc output. - Mailing list pgsql-committers

From Peter Geoghegan
Subject pgsql: Fix wal_consistency_checking enhanced desc output.
Date
Msg-id E1ppBpe-003s3e-KP@gemulon.postgresql.org
Whole thread Raw
List 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@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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Add missed case for tab completion of GRANT/REVOKE MAINTAIN.
Next
From: Peter Geoghegan
Date:
Subject: pgsql: Use nbtdesc "level" field name consistently.