Refactor heap_page_prune_and_freeze() parameters into a struct
Melanie Plageman <melanieplageman@gmail.com>
Author:
Melanie Plageman <melanieplageman@gmail.com>
Date: 2025-11-20T15:32:14Z
Releases:
19 (unreleased)
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@gmail.com> Reviewed-by: Kirill Reshke <reshkekirill@gmail.com> Discussion: https://postgr.es/m/yn4zp35kkdsjx6wf47zcfmxgexxt4h2og47pvnw2x5ifyrs3qc%407uw6jyyxuyf7
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/heap/pruneheap.c | modified | +41 −50 |
| src/backend/access/heap/vacuumlazy.c | modified | +7 −5 |
| src/include/access/heapam.h | modified | +51 −12 |
| src/tools/pgindent/typedefs.list | modified | +1 −0 |
Discussion
- eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access) 168 messages · 2025-06-23 → 2026-04-21