!813 主备解码同一复制槽,备机报错

Merge pull request !813 from maxiang/logical_replication
This commit is contained in:
opengauss-bot
2021-03-15 19:50:50 +08:00
committed by Gitee

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,