update src/gausskernel/storage/replication/slot.cpp.
主备同时解码同一复制槽,备机报错。
This commit is contained in:
@ -418,11 +418,7 @@ void ReplicationSlotAcquire(const char *name, bool isDummyStandby)
|
|||||||
if (slot == NULL)
|
if (slot == NULL)
|
||||||
ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), errmsg("replication slot \"%s\" does not exist", name)));
|
ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), errmsg("replication slot \"%s\" does not exist", name)));
|
||||||
if (active) {
|
if (active) {
|
||||||
if ((slot->data.database != InvalidOid || isDummyStandby != slot->data.isDummyStandby)
|
if ((slot->data.database != InvalidOid || isDummyStandby != slot->data.isDummyStandby))
|
||||||
#ifndef ENABLE_MULTIPLE_NODES
|
|
||||||
&& !RecoveryInProgress()
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
ereport(ERROR, (errcode(ERRCODE_OBJECT_IN_USE), errmsg("replication slot \"%s\" is already active", name)));
|
ereport(ERROR, (errcode(ERRCODE_OBJECT_IN_USE), errmsg("replication slot \"%s\" is already active", name)));
|
||||||
else {
|
else {
|
||||||
ereport(WARNING,
|
ereport(WARNING,
|
||||||
|
Reference in New Issue
Block a user