pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Melanie Plageman <melanieplageman@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Move commonly used context into PruneState and simplify helpers
Date: Thu, 05 Mar 2026 21:11:53 +0000
Message-ID: <E1vyFz7-002ZLs-2M@gemulon.postgresql.org> (raw)

Move commonly used context into PruneState and simplify helpers

heap_page_prune_and_freeze() and many of its helpers use the heap
buffer, block number, and page. Other helpers took the heap page and
didn't use it. Initializing these values once during
prune_freeze_setup() simplifies the helpers' interfaces and avoids any
repeated calls to BufferGetBlockNumber() and BufferGetPage().

While updating PruneState, also reorganize its fields to make the layout
and member documentation more consistent.

Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/BD8B69E7-26D8-4706-9164-597C6AE57812%40gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/59663e4207fdbf8ffffad0c378f0c455ce2beb06

Modified Files
--------------
src/backend/access/heap/pruneheap.c | 136 +++++++++++++++++++-----------------
1 file changed, 72 insertions(+), 64 deletions(-)



Message-ID: <E1vyFz7-002ZLs-2M@gemulon.postgresql.org>
Permalink:  ../E1vyFz7-002ZLs-2M@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vyFz7-002ZLs-2M@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: melanieplageman@gmail.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Move commonly used context into PruneState and simplify helpers
  In-Reply-To: <E1vyFz7-002ZLs-2M@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