mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
repmgrd: improve primary visibility consensus check
Exclude sibling nodes which report they're following a different node. This shouldn't happen, but could.
This commit is contained in:
4
repmgr.c
4
repmgr.c
@@ -436,10 +436,6 @@ get_upstream_node_id(PG_FUNCTION_ARGS)
|
||||
if (!shared_state)
|
||||
PG_RETURN_NULL();
|
||||
|
||||
/* A primary node cannot have an upstream ID */
|
||||
if (!RecoveryInProgress())
|
||||
PG_RETURN_INT32(UNKNOWN_NODE_ID);
|
||||
|
||||
LWLockAcquire(shared_state->lock, LW_SHARED);
|
||||
upstream_node_id = shared_state->upstream_node_id;
|
||||
LWLockRelease(shared_state->lock);
|
||||
|
||||
Reference in New Issue
Block a user