mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 08:36:30 +00:00
No code change, just indentation was incorrect in the failover part
making it hard to read.
This commit is contained in:
40
repmgrd.c
40
repmgrd.c
@@ -827,37 +827,37 @@ standby_monitor(void)
|
|||||||
*/
|
*/
|
||||||
upstream_node = get_node_info(my_local_conn, local_options.cluster_name, upstream_node_id);
|
upstream_node = get_node_info(my_local_conn, local_options.cluster_name, upstream_node_id);
|
||||||
|
|
||||||
if (upstream_node.type == MASTER)
|
if (upstream_node.type == MASTER)
|
||||||
{
|
{
|
||||||
log_debug(_("failure detected on master node (%i); attempting to promote a standby\n"),
|
log_debug(_("failure detected on master node (%i); attempting to promote a standby\n"),
|
||||||
node_info.upstream_node_id);
|
node_info.upstream_node_id);
|
||||||
do_master_failover();
|
do_master_failover();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log_debug(_("failure detected on upstream node %i; attempting to reconnect to new upstream node\n"),
|
log_debug(_("failure detected on upstream node %i; attempting to reconnect to new upstream node\n"),
|
||||||
node_info.upstream_node_id);
|
node_info.upstream_node_id);
|
||||||
|
|
||||||
if (!do_upstream_standby_failover(upstream_node))
|
if (!do_upstream_standby_failover(upstream_node))
|
||||||
{
|
{
|
||||||
PQExpBufferData errmsg;
|
PQExpBufferData errmsg;
|
||||||
initPQExpBuffer(&errmsg);
|
initPQExpBuffer(&errmsg);
|
||||||
|
|
||||||
appendPQExpBuffer(&errmsg,
|
appendPQExpBuffer(&errmsg,
|
||||||
_("unable to reconnect to new upstream node, terminating..."));
|
_("unable to reconnect to new upstream node, terminating..."));
|
||||||
|
|
||||||
log_err("%s\n", errmsg.data);
|
log_err("%s\n", errmsg.data);
|
||||||
|
|
||||||
create_event_record(master_conn,
|
create_event_record(master_conn,
|
||||||
&local_options,
|
&local_options,
|
||||||
local_options.node,
|
local_options.node,
|
||||||
"repmgrd_shutdown",
|
"repmgrd_shutdown",
|
||||||
false,
|
false,
|
||||||
errmsg.data);
|
errmsg.data);
|
||||||
|
|
||||||
terminate(ERR_DB_CON);
|
terminate(ERR_DB_CON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user