repmgrd: minor fixes and comment updates

This commit is contained in:
Ian Barwick
2017-09-08 20:59:21 +09:00
parent e16f68dfce
commit 3447257ae4
2 changed files with 8 additions and 5 deletions

View File

@@ -1506,6 +1506,10 @@ _do_standby_promote_internal(PGconn *conn, const char *data_dir)
*
* Node must be running. To start an inactive node and point it at a
* new primary, use "repmgr node rejoin".
*
* TODO: enable provision of new primary's conninfo parameters, which
* will be necessary if the primary's information has changed, but
* was not replicated to the current standby.
*/
void

View File

@@ -222,7 +222,7 @@ monitor_streaming_primary(void)
if (is_server_available(local_node_info.conninfo) == false)
{
/* node is down, we were expecting it to be up */
/* local node is down, we were expecting it to be up */
if (local_node_info.node_status == NODE_STATUS_UP)
{
PQExpBufferData event_details;
@@ -617,11 +617,10 @@ monitor_streaming_standby(void)
failover_done = do_upstream_standby_failover();
}
// it's possible it will make sense to return in
// all cases to restart monitoring
/* XXX it's possible it will make sense to return in all cases to restart monitoring */
if (failover_done == true)
{
primary_node_id = get_primary_node_id(primary_conn);
primary_node_id = get_primary_node_id(local_conn);
return;
}
}
@@ -1486,7 +1485,7 @@ promote_self(void)
int primary_node_id;
upstream_conn = get_primary_connection(local_conn,
&primary_node_id, NULL);
&primary_node_id, NULL);
if (PQstatus(upstream_conn) == CONNECTION_OK && primary_node_id == failed_primary.node_id)
{