repmgrd: clean up some redundant code

This commit is contained in:
Ian Barwick
2016-11-02 16:52:44 +09:00
parent d502bbe614
commit e274a2cbcb

View File

@@ -774,7 +774,6 @@ standby_monitor(void)
PGconn *upstream_conn;
char upstream_conninfo[MAXCONNINFO];
int upstream_node_id;
t_node_info upstream_node;
int active_master_id;
const char *upstream_node_type = NULL;
@@ -956,6 +955,8 @@ standby_monitor(void)
* Failover handling is handled differently depending on whether
* the failed node is the master or a cascading standby
*/
t_node_info upstream_node;
upstream_node = get_node_info(my_local_conn, local_options.cluster_name, upstream_node_id);
if (upstream_node.type == MASTER)
@@ -1059,9 +1060,6 @@ standby_monitor(void)
* from the upstream node to write monitoring information
*/
/* XXX not used? */
upstream_node = get_node_info(my_local_conn, local_options.cluster_name, upstream_node_id);
sprintf(sqlquery,
"SELECT id "
" FROM %s.repl_nodes "