repmgr: use --compact (not --terse) in "cluster events" to hide details column

This is consistent with usage elsewhere.

"--terse" is intended to reduce logging noise.
This commit is contained in:
Ian Barwick
2019-05-30 14:19:37 +09:00
parent 06a83247c9
commit d4df0055c9
4 changed files with 7 additions and 3 deletions

View File

@@ -16,6 +16,7 @@
as reported by each individual node (Ian) as reported by each individual node (Ian)
repmgr: in "cluster show" and "daemon status", check if a node is attached repmgr: in "cluster show" and "daemon status", check if a node is attached
to its advertised upstream node to its advertised upstream node
repmgr: use --compact rather than --terse option in "cluster event" (Ian)
repmgr: prevent a standby being cloned from a witness server (Ian) repmgr: prevent a standby being cloned from a witness server (Ian)
repmgr: prevent a witness server being registered on the cluster primary (John) repmgr: prevent a witness server being registered on the cluster primary (John)
repmgr: ensure BDR2-specific functionality cannot be used on repmgr: ensure BDR2-specific functionality cannot be used on

View File

@@ -45,7 +45,7 @@
</itemizedlist> </itemizedlist>
</para> </para>
<para> <para>
The "Details" column can be omitted by providing <literal>--terse</literal>. The &quot;Details&quot; column can be omitted by providing <literal>--compact</literal>.
</para> </para>
</refsect1> </refsect1>

View File

@@ -382,6 +382,7 @@ do_cluster_show(void)
* --node-[id|name] * --node-[id|name]
* --event * --event
* --csv * --csv
* --compact
*/ */
void void
@@ -427,11 +428,11 @@ do_cluster_event(void)
strncpy(headers_event[EV_DETAILS].title, _("Details"), MAXLEN); strncpy(headers_event[EV_DETAILS].title, _("Details"), MAXLEN);
/* /*
* If --terse or --csv provided, simply omit the "Details" column. * If --compact or --csv provided, simply omit the "Details" column.
* In --csv mode we'd need to quote/escape the contents "Details" column, * In --csv mode we'd need to quote/escape the contents "Details" column,
* which is doable but which will remain a TODO for now. * which is doable but which will remain a TODO for now.
*/ */
if (runtime_options.terse == true || runtime_options.output_mode == OM_CSV) if (runtime_options.compact == true || runtime_options.output_mode == OM_CSV)
column_count --; column_count --;
for (i = 0; i < column_count; i++) for (i = 0; i < column_count; i++)
@@ -1462,6 +1463,7 @@ do_cluster_help(void)
printf(_(" --event filter specific event\n")); printf(_(" --event filter specific event\n"));
printf(_(" --node-id restrict entries to node with this ID\n")); printf(_(" --node-id restrict entries to node with this ID\n"));
printf(_(" --node-name restrict entries to node with this name\n")); printf(_(" --node-name restrict entries to node with this name\n"));
printf(_(" --compact omit \"Details\" column"));
printf(_(" --csv emit output as CSV\n")); printf(_(" --csv emit output as CSV\n"));
puts(""); puts("");

View File

@@ -1945,6 +1945,7 @@ check_cli_parameters(const int action)
switch (action) switch (action)
{ {
case CLUSTER_SHOW: case CLUSTER_SHOW:
case CLUSTER_EVENT:
case DAEMON_STATUS: case DAEMON_STATUS:
break; break;
default: default: