repmgrd: consolidate clear_node_info_list() calls

This commit is contained in:
Ian Barwick
2017-07-09 11:10:49 +09:00
parent 2787994a6e
commit 5bf7098139
2 changed files with 7 additions and 7 deletions

View File

@@ -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,

View File

@@ -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,