From 4384f940ec090f69a3e22bb02f646e3f6c2ca4c2 Mon Sep 17 00:00:00 2001 From: wangxin Date: Sat, 17 Apr 2021 11:51:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=A0=E9=99=A4=E6=AD=A3?= =?UTF-8?q?=E5=9C=A8=E8=A7=A3=E7=A0=81=E7=9A=84=E5=A4=8D=E5=88=B6=E6=A7=BD?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=A4=87=E6=9C=BA=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E5=81=9C=E6=AD=A2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/storage/replication/slot.cpp | 4 ++-- src/include/replication/slot.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gausskernel/storage/replication/slot.cpp b/src/gausskernel/storage/replication/slot.cpp index 0fbdfa661..133ff0f4f 100644 --- a/src/gausskernel/storage/replication/slot.cpp +++ b/src/gausskernel/storage/replication/slot.cpp @@ -386,7 +386,7 @@ void ReplicationSlotCreate(const char *name, ReplicationSlotPersistency persiste /* * Find a previously created slot and mark it as used by this backend. */ -void ReplicationSlotAcquire(const char *name, bool isDummyStandby, bool isDrop) +void ReplicationSlotAcquire(const char *name, bool isDummyStandby, bool allowDrop) { ReplicationSlot *slot = NULL; int i; @@ -421,7 +421,7 @@ void ReplicationSlotAcquire(const char *name, bool isDummyStandby, bool isDrop) if (active) { if ((slot->data.database != InvalidOid || isDummyStandby != slot->data.isDummyStandby) #ifndef ENABLE_MULTIPLE_NODES - && !isDrop + && !allowDrop #endif ) ereport(ERROR, (errcode(ERRCODE_OBJECT_IN_USE), errmsg("replication slot \"%s\" is already active", name))); diff --git a/src/include/replication/slot.h b/src/include/replication/slot.h index 567daae27..07f2cf3e8 100644 --- a/src/include/replication/slot.h +++ b/src/include/replication/slot.h @@ -207,7 +207,7 @@ extern void ReplicationSlotCreate(const char* name, ReplicationSlotPersistency p Oid databaseId, XLogRecPtr restart_lsn, char* extra_content = NULL, bool encrypted = false); extern void ReplicationSlotPersist(void); extern void ReplicationSlotDrop(const char* name, bool for_backup = false); -extern void ReplicationSlotAcquire(const char* name, bool isDummyStandby, bool isDrop = false); +extern void ReplicationSlotAcquire(const char* name, bool isDummyStandby, bool allowDrop = false); extern bool IsReplicationSlotActive(const char *name); bool ReplicationSlotFind(const char* name); extern void ReplicationSlotRelease(void);