Keep all_frozen updated in heap_page_prune_and_freeze
authorMelanie Plageman <melanieplageman@gmail.com>
Thu, 20 Nov 2025 15:58:34 +0000 (10:58 -0500)
committerMelanie Plageman <melanieplageman@gmail.com>
Thu, 20 Nov 2025 15:59:24 +0000 (10:59 -0500)
commit351d7e244183ee33400c19e4b52c5446eb29038c
treeedc1885a19133027a8fdc02281fe8882ce846f64
parent1937ed70621e203c99e651ce4430dd217743d150
Keep all_frozen updated in heap_page_prune_and_freeze

Previously, we relied on all_visible and all_frozen being used together
to ensure that all_frozen was correct, but it is better to keep both
fields updated.

Future changes will separate their usage, so we should not depend on
all_visible for the validity of all_frozen.

Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Discussion: https://postgr.es/m/flat/CAAKRu_ZMw6Npd_qm2KM%2BFwQ3cMOMx1Dh3VMhp8-V7SOLxdK9-g%40mail.gmail.com
src/backend/access/heap/pruneheap.c
src/backend/access/heap/vacuumlazy.c