pgsql: Fix Heap rmgr's desc output for infobits arrays. - Mailing list pgsql-committers

From Peter Geoghegan
Subject pgsql: Fix Heap rmgr's desc output for infobits arrays.
Date
Msg-id E1pmMQV-002bKp-2Z@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix Heap rmgr's desc output for infobits arrays.

Make heap desc routines that output status bit as arrays of constants
avoid outputting array literals that contain superfluous punctuation
characters that complicate parsing the output.  Also make sure that no
heap desc routine repeats the same key name (at the same nesting level),
for the same reason.  Arguably, these were both oversights in commit
7d8219a4.

In passing, make the desc output code (which covers Heap's DELETE,
UPDATE, HOT_UPDATE, LOCK, and LOCK_UPDATED record types) consistent in
terms of the output order of each field.  This order also matches WAL
record struct order.  Heap's DELETE desc output now shows the record's
xmax field for the first time (just like UPDATE/HOT_UPDATE records).

Author: Peter Geoghegan <pg@bowt.ie>
Reviewed-By: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://postgr.es/m/CAH2-Wz=pNYtxiJ2Jx5Lj=fKo1OEZ4GE0p_kct+ugAUTqBwU46g@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/96149a180d56162b0288e8c8ec5ee2c1f076e88b

Modified Files
--------------
src/backend/access/rmgrdesc/heapdesc.c | 120 +++++++++++++++++++--------------
1 file changed, 71 insertions(+), 49 deletions(-)


pgsql-committers by date:

Previous
From: Peter Geoghegan
Date:
Subject: pgsql: Fix xl_heap_lock WAL record field's data type.
Next
From: Peter Geoghegan
Date:
Subject: pgsql: Refine the guidelines for rmgrdesc authors.