Keep all_frozen updated in heap_page_prune_and_freeze

Melanie Plageman <melanieplageman@gmail.com>

Commit: 351d7e244183ee33400c19e4b52c5446eb29038c
Author: Melanie Plageman <melanieplageman@gmail.com>
Date: 2025-11-20T15:59:24Z
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

Files

PathChange+/−
src/backend/access/heap/pruneheap.c modified +33 −27
src/backend/access/heap/vacuumlazy.c modified +4 −5

Discussion

Cited messages not in the archive: flat/CAAKRu_ZMw6Npd_qm2KM+FwQ3cMOMx1Dh3VMhp8-V7SOLxdK9-g@mail.gmail.com