Assert that cutoffs are provided if freezing will be attempted
authorMelanie Plageman <[email protected]>
Tue, 25 Nov 2025 21:39:56 +0000 (16:39 -0500)
committerMelanie Plageman <[email protected]>
Tue, 25 Nov 2025 21:41:29 +0000 (16:41 -0500)
commitcd38b7e77315c729ea1e52ca7b8bb0d7c20d2a3b
tree27b85cccd690e1063b916bb21e0791a05796f87b
parent3b9c118920580b97d0f6f618954876227a50a14a
Assert that cutoffs are provided if freezing will be attempted

heap_page_prune_and_freeze() requires the caller to initialize
PruneFreezeParams->cutoffs so that the function can correctly evaluate
whether tuples should be frozen. This requirement previously existed
only in comments and was easy to miss, especially after “cutoffs” was
converted from a direct function parameter to a field of the newly
introduced PruneFreezeParams struct (added in 1937ed70621). Adding an
assert makes this requirement explicit and harder to violate.

Also, fix a minor typo while we're at it.

Author: Chao Li <[email protected]>
Reviewed-by: Melanie Plageman <[email protected]>
Discussion: https://postgr.es/m/0AC177F5-5E26-45EE-B273-357C51212AC5%40gmail.com
src/backend/access/heap/pruneheap.c