v3-0002-use-shared-buffers-when-failsafe-active.patch
text/x-patch
Filename: v3-0002-use-shared-buffers-when-failsafe-active.patch
Type: text/x-patch
Part: 0
Patch
Format: format-patch
Series: patch v3-0002
Subject: use shared buffers when failsafe active
| File | + | − |
|---|---|---|
| src/backend/access/heap/vacuumlazy.c | 5 | 0 |
From 6f40d87f4f462d48a67721260be7e30a7438520e Mon Sep 17 00:00:00 2001
From: Melanie Plageman <melanieplageman@gmail.com>
Date: Wed, 22 Feb 2023 12:26:01 -0500
Subject: [PATCH v3 2/3] 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