]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Move commonly used context into PruneState and simplify helpers
authorMelanie Plageman <melanieplageman@gmail.com>
Thu, 5 Mar 2026 21:10:29 +0000 (16:10 -0500)
committerMelanie Plageman <melanieplageman@gmail.com>
Thu, 5 Mar 2026 21:10:29 +0000 (16:10 -0500)
commit59663e4207fdbf8ffffad0c378f0c455ce2beb06
tree0b1a460c20c2cc80519e6d87b83035fb5c225123
parentac0accafd6b6eef1a86a50f42346e1e926505df2
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
src/backend/access/heap/pruneheap.c