mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
Various minor fixes and code comments
This commit is contained in:
@@ -1374,7 +1374,7 @@ update_node_record_set_master(PGconn *conn, int this_node_id)
|
|||||||
initPQExpBuffer(&query);
|
initPQExpBuffer(&query);
|
||||||
|
|
||||||
appendPQExpBuffer(&query,
|
appendPQExpBuffer(&query,
|
||||||
" UPDATE repmgr.repl_nodes "
|
" UPDATE repmgr.nodes "
|
||||||
" SET active = FALSE "
|
" SET active = FALSE "
|
||||||
" WHERE type = 'master' "
|
" WHERE type = 'master' "
|
||||||
" AND active IS TRUE ");
|
" AND active IS TRUE ");
|
||||||
|
|||||||
@@ -172,6 +172,10 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
|
/*
|
||||||
|
* in contrast to repmgr3 and earlier, we only display the repmgr version
|
||||||
|
* as it's not specific to a particular PostgreSQL version
|
||||||
|
*/
|
||||||
printf("%s %s\n", progname(), REPMGR_VERSION);
|
printf("%s %s\n", progname(), REPMGR_VERSION);
|
||||||
exit(SUCCESS);
|
exit(SUCCESS);
|
||||||
|
|
||||||
@@ -553,13 +557,13 @@ main(int argc, char **argv)
|
|||||||
if (strcasecmp(repmgr_action, "REGISTER") == 0)
|
if (strcasecmp(repmgr_action, "REGISTER") == 0)
|
||||||
action = MASTER_REGISTER;
|
action = MASTER_REGISTER;
|
||||||
}
|
}
|
||||||
else if(strcasecmp(repmgr_node_type, "STANDBY") == 0)
|
else if (strcasecmp(repmgr_node_type, "STANDBY") == 0)
|
||||||
{
|
{
|
||||||
if (strcasecmp(repmgr_action, "CLONE") == 0)
|
if (strcasecmp(repmgr_action, "CLONE") == 0)
|
||||||
action = STANDBY_CLONE;
|
action = STANDBY_CLONE;
|
||||||
else if(strcasecmp(repmgr_action, "REGISTER") == 0)
|
else if (strcasecmp(repmgr_action, "REGISTER") == 0)
|
||||||
action = STANDBY_REGISTER;
|
action = STANDBY_REGISTER;
|
||||||
else if(strcasecmp(repmgr_action, "UNREGISTER") == 0)
|
else if (strcasecmp(repmgr_action, "UNREGISTER") == 0)
|
||||||
action = STANDBY_UNREGISTER;
|
action = STANDBY_UNREGISTER;
|
||||||
else if (strcasecmp(repmgr_action, "PROMOTE") == 0)
|
else if (strcasecmp(repmgr_action, "PROMOTE") == 0)
|
||||||
action = STANDBY_PROMOTE;
|
action = STANDBY_PROMOTE;
|
||||||
@@ -573,7 +577,7 @@ main(int argc, char **argv)
|
|||||||
action = STANDBY_RESTORE_CONFIG;
|
action = STANDBY_RESTORE_CONFIG;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(strcasecmp(repmgr_node_type, "CLUSTER") == 0)
|
else if (strcasecmp(repmgr_node_type, "CLUSTER") == 0)
|
||||||
{
|
{
|
||||||
if (strcasecmp(repmgr_action, "EVENT") == 0)
|
if (strcasecmp(repmgr_action, "EVENT") == 0)
|
||||||
action = CLUSTER_EVENT;
|
action = CLUSTER_EVENT;
|
||||||
|
|||||||
Reference in New Issue
Block a user