fix drop slot failed

Offering: openGaussDev

More detail: Modify drop replication slot part

Match-id-a167049aa605cf4fae4bfa8c05188a5e0ab23a78
This commit is contained in:
openGaussDev
2022-03-06 21:22:41 +08:00
committed by yanghao
parent 79e95ec77b
commit dc8a4f11e3

View File

@ -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);