From dc8a4f11e38ad5fdac27d2175178b75f2ec70584 Mon Sep 17 00:00:00 2001 From: openGaussDev Date: Sun, 6 Mar 2022 21:22:41 +0800 Subject: [PATCH] fix drop slot failed Offering: openGaussDev More detail: Modify drop replication slot part Match-id-a167049aa605cf4fae4bfa8c05188a5e0ab23a78 --- src/gausskernel/storage/replication/slot.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gausskernel/storage/replication/slot.cpp b/src/gausskernel/storage/replication/slot.cpp index 8671ac22c..a9bbd8c3e 100755 --- a/src/gausskernel/storage/replication/slot.cpp +++ b/src/gausskernel/storage/replication/slot.cpp @@ -705,7 +705,8 @@ static void ReplicationSlotDropAcquired(void) } else { volatile ReplicationSlot *vslot = slot; - bool fail_softly = GET_SLOT_PERSISTENCY(slot->data) == RS_EPHEMERAL; + bool fail_softly = GET_SLOT_PERSISTENCY(slot->data) == RS_EPHEMERAL || + (GET_SLOT_PERSISTENCY(slot->data) == RS_PERSISTENT && slot->extra_content != NULL); SpinLockAcquire(&slot->mutex); vslot->active = false; SpinLockRelease(&slot->mutex);