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 nbtree posting list update desc output.
Date: Mon, 10 Apr 2023 18:16:24 +0000
Message-ID: <E1plw3z-002P9k-C7@gemulon.postgresql.org> (raw)

Fix nbtree posting list update desc output.

We cannot use the generic array_desc approach with per-tuple nbtree
posting list update metadata because array_desc can only deal with fixed
width elements (e.g., page offset numbers).  Using array_desc led to
incorrect rmgr descriptions for updates from nbtree DELETE/VACUUM WAL
records.

To fix, add specialized code to describe the update metadata as array
elements in desc output.  We now iterate over the update metadata using
an approach that matches related REDO routines.

Also stop showing the updates offset number array separately in nbtree
DELETE/VACUUM desc output.  It's redundant information, since the same
page offset numbers appear in the description of each individual update
element.  Also make some small tweaks to the way that we format arrays
in all desc routines (not just nbtree desc routines) to make arrays a
little less verbose.

Oversight in commit 1c453cfd, which enhanced the nbtree rmgr desc
routines.

Author: Peter Geoghegan <pg@bowt.ie>
Discussion: https://postgr.es/m/CAH2-WzkbYuvwYKm-Y-72QEh6SPMQcAo9uONv+mR3bMGcu9E_Cg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5d6728e588c37a4e458db9d55b308c8a3832a944

Modified Files
--------------
doc/src/sgml/pgwalinspect.sgml               |  34 ++++----
src/backend/access/rmgrdesc/heapdesc.c       |   2 +-
src/backend/access/rmgrdesc/nbtdesc.c        | 123 ++++++++++++++-------------
src/backend/access/rmgrdesc/rmgrdesc_utils.c |  23 ++---
src/include/access/rmgrdesc_utils.h          |   3 +-
5 files changed, 87 insertions(+), 98 deletions(-)



Message-ID: <E1plw3z-002P9k-C7@gemulon.postgresql.org>
Permalink:  ../E1plw3z-002P9k-C7@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1plw3z-002P9k-C7@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 nbtree posting list update desc output.
  In-Reply-To: <E1plw3z-002P9k-C7@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