diff --git a/repmgr-action-bdr.c b/repmgr-action-bdr.c index 77164b8b..fadefa06 100644 --- a/repmgr-action-bdr.c +++ b/repmgr-action-bdr.c @@ -421,5 +421,18 @@ do_bdr_help(void) { print_help_header(); + printf(_("Usage:\n")); + printf(_(" %s [OPTIONS] bdr register\n"), progname()); + printf(_(" %s [OPTIONS] bdr unregister\n"), progname()); + puts(""); + printf(_("BDR REGISTER\n")); + puts(""); + printf(_(" \"bdr register\" initialises the repmgr cluster and registers the initial bdr node.\n")); + puts(""); + + printf(_("BDR UNREGISTER\n")); + puts(""); + printf(_(" \"bdr unregister\" unregisters an inactive BDR node.\n")); + puts(""); } diff --git a/repmgr-action-cluster.c b/repmgr-action-cluster.c index 1025943f..9430b10d 100644 --- a/repmgr-action-cluster.c +++ b/repmgr-action-cluster.c @@ -1170,25 +1170,35 @@ do_cluster_help(void) puts(""); printf(_(" Configuration file or database connection required.\n")); puts(""); - printf(_(" --csv emit output as CSV (with a subset of fields)\n")); + printf(_(" --csv emit output as CSV (with a subset of fields)\n")); puts(""); printf(_("CLUSTER MATRIX\n")); puts(""); - printf(_(" \"cluster show\" displays a matrix showing connectivity between nodes, seen from this node.\n")); + printf(_(" \"cluster matrix\" displays a matrix showing connectivity between nodes, seen from this node.\n")); puts(""); printf(_(" Configuration file or database connection required.\n")); puts(""); - printf(_(" --csv emit output as CSV\n")); + printf(_(" --csv emit output as CSV\n")); puts(""); + printf(_("CLUSTER CROSSCHECK\n")); + puts(""); + printf(_(" \"cluster crosscheck\" displays a matrix showing connectivity between nodes, seen from all nodes.\n")); + puts(""); + printf(_(" Configuration file or database connection required.\n")); + puts(""); + printf(_(" --csv emit output as CSV\n")); + puts(""); + + printf(_("CLUSTER EVENT\n")); puts(""); printf(_(" \"cluster event\" lists recent events logged in the \"repmgr.events\" table.\n")); puts(""); - printf(_(" --limit maximum number of events to display (default: %i)\n"), CLUSTER_EVENT_LIMIT); - printf(_(" --all display all events (overrides --limit)\n")); - printf(_(" --event filter specific event\n")); + printf(_(" --limit maximum number of events to display (default: %i)\n"), CLUSTER_EVENT_LIMIT); + printf(_(" --all display all events (overrides --limit)\n")); + printf(_(" --event filter specific event\n")); puts(""); } diff --git a/repmgr-action-node.c b/repmgr-action-node.c index 27be99d1..6d4775c5 100644 --- a/repmgr-action-node.c +++ b/repmgr-action-node.c @@ -1970,5 +1970,31 @@ do_node_help(void) { print_help_header(); + printf(_("Usage:\n")); + printf(_(" %s [OPTIONS] node status\n"), progname()); + printf(_(" %s [OPTIONS] node check\n"), progname()); + printf(_(" %s [OPTIONS] node rejoin\n"), progname()); + printf(_(" %s [OPTIONS] node service\n"), progname()); + puts(""); + + printf(_("NODE STATUS\n")); + puts(""); + printf(_(" \"node status\" .\n")); + puts(""); + + printf(_("NODE CHECK\n")); + puts(""); + printf(_(" \"node check\" .\n")); + puts(""); + + printf(_("NODE REJOIN\n")); + puts(""); + printf(_(" \"node rejoin\" .\n")); + puts(""); + + printf(_("NODE SERVICE\n")); + puts(""); + printf(_(" \"node service\" .\n")); + puts(""); } diff --git a/repmgr-action-primary.c b/repmgr-action-primary.c index 01b2ddbe..ff67d567 100644 --- a/repmgr-action-primary.c +++ b/repmgr-action-primary.c @@ -497,5 +497,21 @@ do_primary_help(void) { print_help_header(); + printf(_("Usage:\n")); + printf(_(" %s [OPTIONS] primary register\n"), progname()); + printf(_(" %s [OPTIONS] primary unregister\n"), progname()); + puts(""); + printf(_(" Note: \"%s repmgr master ...\" can be used as an alias\n"), progname()); + puts(""); + + printf(_("PRIMARY REGISTER\n")); + puts(""); + printf(_(" \"primary register\" initialises the repmgr cluster and registers the primary node.\n")); + puts(""); + + printf(_("PRIMARY UNREGISTER\n")); + puts(""); + printf(_(" \"primary unregister\" unregisters an inactive primary node.\n")); + puts(""); } diff --git a/repmgr-action-standby.c b/repmgr-action-standby.c index 1e440468..f31d0622 100644 --- a/repmgr-action-standby.c +++ b/repmgr-action-standby.c @@ -4073,4 +4073,46 @@ do_standby_help(void) print_help_header(); + + printf(_("Usage:\n")); + printf(_(" %s [OPTIONS] standby clone\n"), progname()); + printf(_(" %s [OPTIONS] standby register\n"), progname()); + printf(_(" %s [OPTIONS] standby unregister\n"), progname()); + printf(_(" %s [OPTIONS] standby promote\n"), progname()); + printf(_(" %s [OPTIONS] standby follow\n"), progname()); + printf(_(" %s [OPTIONS] standby switchover\n"), progname()); + + puts(""); + + printf(_("STANDBY CLONE\n")); + puts(""); + printf(_(" \"standby clone\" clones a standby from the primary or an upstream node.\n")); + puts(""); + + printf(_("STANDBY REGISTER\n")); + puts(""); + printf(_(" \"standby register\" registers the standby node.\n")); + puts(""); + + printf(_("STANDBY UNREGISTER\n")); + puts(""); + printf(_(" \"standby unregister\" unregisters an inactive standby node.\n")); + puts(""); + + printf(_("STANDBY PROMOTE\n")); + puts(""); + printf(_(" \"standby promote\" promotes a standby node to primary.\n")); + puts(""); + + printf(_("STANDBY FOLLOW\n")); + puts(""); + printf(_(" \"standby follow\" instructs a standby node to follow a new primary.\n")); + puts(""); + + + printf(_("STANDBY SWITCHOVER\n")); + puts(""); + printf(_(" \"standby switchover\" promotes a standby node to primary, and demotes the previous primary to a standby.\n")); + puts(""); + } diff --git a/repmgr-client.c b/repmgr-client.c index bf65499f..6d8da764 100644 --- a/repmgr-client.c +++ b/repmgr-client.c @@ -63,8 +63,7 @@ t_conninfo_param_list source_conninfo; bool config_file_required = true; char pg_bindir[MAXLEN] = ""; - -char path_buf[MAXLEN] = ""; +char path_buf[MAXLEN] = ""; /* * if --node-id/--node-name provided, place that node's record here @@ -177,14 +176,11 @@ main(int argc, char **argv) case OPT_HELP: /* --help */ help_option = true; break; - //do_help(); - //exit(SUCCESS); case '?': /* Actual help option given */ if (strcmp(argv[optind - 1], "-?") == 0) { - do_help(); - exit(SUCCESS); + help_option = true; } break; case 'V':