From 81f01ca623b115647ee78a1b09bbb4458fb35dab Mon Sep 17 00:00:00 2001 From: Peter Geoghegan Date: Sat, 19 Feb 2022 16:13:48 -0800 Subject: [PATCH 2/2] Fix for pg_surgery's heap_force_kill() function. --- contrib/pg_surgery/heap_surgery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/pg_surgery/heap_surgery.c b/contrib/pg_surgery/heap_surgery.c index 3e641aa64..a3a193ba5 100644 --- a/contrib/pg_surgery/heap_surgery.c +++ b/contrib/pg_surgery/heap_surgery.c @@ -311,7 +311,8 @@ heap_force_common(FunctionCallInfo fcinfo, HeapTupleForceOption heap_force_opt) */ if (did_modify_page) { - /* Mark buffer dirty before we write WAL. */ + /* Defragment and mark buffer dirty before we write WAL. */ + PageRepairFragmentation(page); MarkBufferDirty(buf); /* XLOG stuff */ -- 2.30.2