From 313deb07f729924da650eb01d31cdb722950a5b1 Mon Sep 17 00:00:00 2001 From: Melanie Plageman Date: Wed, 22 Feb 2023 12:26:01 -0500 Subject: [PATCH v1 3/4] use shared buffers when failsafe active --- src/backend/access/heap/vacuumlazy.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index 8f14cf85f3..b319a244d5 100644 --- a/src/backend/access/heap/vacuumlazy.c +++ b/src/backend/access/heap/vacuumlazy.c @@ -2622,6 +2622,11 @@ lazy_check_wraparound_failsafe(LVRelState *vacrel) if (unlikely(vacuum_xid_failsafe_check(&vacrel->cutoffs))) { vacrel->failsafe_active = true; + /* + * Assume the caller who allocated the memory for the + * BufferAccessStrategy object will free it. + */ + vacrel->bstrategy = NULL; /* Disable index vacuuming, index cleanup, and heap rel truncation */ vacrel->do_index_vacuuming = false; -- 2.37.2