pgsql: Refactor heap_page_prune_and_freeze() parameters into a struct

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Refactor heap_page_prune_and_freeze() parameters into a struct
Date: 2025-11-20 15:35:07
Message-ID: E1vM6gc-000UMt-2m@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Refactor heap_page_prune_and_freeze() parameters into a struct

heap_page_prune_and_freeze() had accumulated an unwieldy number of input
parameters and upcoming work to handle VM updates in this function will
add even more.

Introduce a new PruneFreezeParams struct to group the function’s input
parameters, improving readability and maintainability.

Author: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Reviewed-by: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Discussion: https://postgr.es/m/yn4zp35kkdsjx6wf47zcfmxgexxt4h2og47pvnw2x5ifyrs3qc%407uw6jyyxuyf7

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1937ed70621e203c99e651ce4430dd217743d150

Modified Files
--------------
src/backend/access/heap/pruneheap.c | 91 ++++++++++++++++--------------------
src/backend/access/heap/vacuumlazy.c | 12 +++--
src/include/access/heapam.h | 63 ++++++++++++++++++++-----
src/tools/pgindent/typedefs.list | 1 +
4 files changed, 100 insertions(+), 67 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2025-11-20 15:44:31 Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent
Previous Message Daniel Gustafsson 2025-11-20 14:10:53 pgsql: doc: Assorted documentation improvements