Add helper for freeze determination to heap_page_prune_and_freeze
authorMelanie Plageman <melanieplageman@gmail.com>
Tue, 14 Oct 2025 19:07:40 +0000 (15:07 -0400)
committerMelanie Plageman <melanieplageman@gmail.com>
Tue, 14 Oct 2025 19:08:50 +0000 (15:08 -0400)
commitc8dd6542bae42744c676234dca45972e2cc3dfb2
treed3e0f94bd219d046ef33005cb1270014cc273616
parent74ac377d75135e02064fc4427bec401277b4f60c
Add helper for freeze determination to heap_page_prune_and_freeze

After scanning the line pointers on a heap page during the first phase
of vacuum, we use the information collected to decide whether to use
the assembled freeze plans.

Move this decision logic into a helper function to improve readability.

While here, rename a PruneState member and disambiguate some local
variables in heap_page_prune_and_freeze().

Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/2wk7jo4m4qwh5sn33pfgerdjfujebbccsmmlownybddbh6nawl%40mdyyqpqzxjek
src/backend/access/heap/pruneheap.c