From d98156d3d8ac522381dc3ccf9a8608168649fdfe Mon Sep 17 00:00:00 2001
From: Melanie Plageman <melanieplageman@gmail.com>
Date: Mon, 7 Jul 2025 17:33:26 -0400
Subject: [PATCH v4 01/13] Add assert to heap_prune_record_unchanged_lp_normal

Not all callers provide VacuumCutoffs to heap_page_prune_and_freeze(),
so assert those are provided before passing them along to
heap_prepare_freeze_tuple().
---
 src/backend/access/heap/pruneheap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c
index a8025889be0..dd00931f179 100644
--- a/src/backend/access/heap/pruneheap.c
+++ b/src/backend/access/heap/pruneheap.c
@@ -1480,6 +1480,7 @@ heap_prune_record_unchanged_lp_normal(Page page, PruneState *prstate, OffsetNumb
 	{
 		bool		totally_frozen;
 
+		Assert(prstate->cutoffs);
 		if ((heap_prepare_freeze_tuple(htup,
 									   prstate->cutoffs,
 									   &prstate->pagefrz,
-- 
2.43.0

