mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 15:16:29 +00:00
repmgrd: consolidate clear_node_info_list() calls
This commit is contained in:
@@ -1430,6 +1430,8 @@ get_active_sibling_node_records(PGconn *conn, int node_id, int upstream_node_id,
|
||||
PQExpBufferData query;
|
||||
PGresult *res;
|
||||
|
||||
clear_node_info_list(node_list);
|
||||
|
||||
initPQExpBuffer(&query);
|
||||
|
||||
appendPQExpBuffer(&query,
|
||||
|
||||
12
repmgrd.c
12
repmgrd.c
@@ -934,8 +934,11 @@ monitor_streaming_standby(void)
|
||||
goto loop;
|
||||
}
|
||||
}
|
||||
// unable to connect to former primary - check if another node has
|
||||
// been promoted
|
||||
else
|
||||
{
|
||||
// unable to connect to former primary - check if another node has
|
||||
// been promoted
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1031,7 +1034,6 @@ do_primary_failover(void)
|
||||
|
||||
|
||||
/* reset node list */
|
||||
clear_node_info_list(&standby_nodes);
|
||||
get_active_sibling_node_records(local_conn,
|
||||
local_node_info.node_id,
|
||||
upstream_node_info.node_id,
|
||||
@@ -1107,8 +1109,6 @@ do_primary_failover(void)
|
||||
|
||||
failover_state = promote_self();
|
||||
|
||||
/* reset node list */
|
||||
clear_node_info_list(&standby_nodes);
|
||||
get_active_sibling_node_records(local_conn,
|
||||
local_node_info.node_id,
|
||||
upstream_node_info.node_id,
|
||||
@@ -1838,8 +1838,6 @@ do_election(void)
|
||||
/* get all active nodes attached to primary, excluding self */
|
||||
// XXX include barman node in results
|
||||
|
||||
clear_node_info_list(&standby_nodes);
|
||||
|
||||
get_active_sibling_node_records(local_conn,
|
||||
local_node_info.node_id,
|
||||
upstream_node_info.node_id,
|
||||
|
||||
Reference in New Issue
Block a user