update src/gausskernel/storage/replication/slot.cpp.

主备同时解码同一复制槽,备机报错。
This commit is contained in:
maxiang
2021-03-14 21:24:40 +08:00
committed by Gitee
parent eeafa3a03e
commit 0e5a5c9275

View File

@ -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,