修复删除正在解码的复制槽时,备机数据库停止的问题
This commit is contained in:
@ -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)));
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user