From 0e5a5c9275ac770857fdc6de5c06aaf22a2b6656 Mon Sep 17 00:00:00 2001 From: maxiang <8185929+Xiao__Ma@user.noreply.gitee.com> Date: Sun, 14 Mar 2021 21:24:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?update=20src/gausskernel/storage/replicatio?= =?UTF-8?q?n/slot.cpp.=20=E4=B8=BB=E5=A4=87=E5=90=8C=E6=97=B6=E8=A7=A3?= =?UTF-8?q?=E7=A0=81=E5=90=8C=E4=B8=80=E5=A4=8D=E5=88=B6=E6=A7=BD=EF=BC=8C?= =?UTF-8?q?=E5=A4=87=E6=9C=BA=E6=8A=A5=E9=94=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/storage/replication/slot.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gausskernel/storage/replication/slot.cpp b/src/gausskernel/storage/replication/slot.cpp index 910eab635..e802c2333 100644 --- a/src/gausskernel/storage/replication/slot.cpp +++ b/src/gausskernel/storage/replication/slot.cpp @@ -418,11 +418,7 @@ void ReplicationSlotAcquire(const char *name, bool isDummyStandby) if (slot == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), errmsg("replication slot \"%s\" does not exist", name))); if (active) { - if ((slot->data.database != InvalidOid || isDummyStandby != slot->data.isDummyStandby) -#ifndef ENABLE_MULTIPLE_NODES - && !RecoveryInProgress() -#endif - ) + if ((slot->data.database != InvalidOid || isDummyStandby != slot->data.isDummyStandby)) ereport(ERROR, (errcode(ERRCODE_OBJECT_IN_USE), errmsg("replication slot \"%s\" is already active", name))); else { ereport(WARNING, From c915c98fa584904b4c3c32933484a32bbb99997b Mon Sep 17 00:00:00 2001 From: maxiang <8185929+Xiao__Ma@user.noreply.gitee.com> Date: Sun, 14 Mar 2021 21:39:58 +0800 Subject: [PATCH 2/2] update src/gausskernel/storage/replication/slot.cpp. --- src/gausskernel/storage/replication/slot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gausskernel/storage/replication/slot.cpp b/src/gausskernel/storage/replication/slot.cpp index e802c2333..5aa6c3212 100644 --- a/src/gausskernel/storage/replication/slot.cpp +++ b/src/gausskernel/storage/replication/slot.cpp @@ -418,7 +418,7 @@ void ReplicationSlotAcquire(const char *name, bool isDummyStandby) if (slot == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), errmsg("replication slot \"%s\" does not exist", name))); if (active) { - if ((slot->data.database != InvalidOid || isDummyStandby != slot->data.isDummyStandby)) + if (slot->data.database != InvalidOid || isDummyStandby != slot->data.isDummyStandby) ereport(ERROR, (errcode(ERRCODE_OBJECT_IN_USE), errmsg("replication slot \"%s\" is already active", name))); else { ereport(WARNING,