mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Use --compact option for abbreviated display output
--terse is meant for reducing log chatter.
This commit is contained in:
2
HISTORY
2
HISTORY
@@ -1,7 +1,7 @@
|
||||
4.3 2019-??
|
||||
repmgr: add "daemon (start|stop)" command; GitHub #528 (Ian)
|
||||
repmgr: add --version-number command line option (Ian)
|
||||
repmgr: add --terse option to "cluster show"; GitHub #521 (Ian)
|
||||
repmgr: add --compact option to "cluster show"; GitHub #521 (Ian)
|
||||
repmgr: add --dry-run option to "standby promote"; GitHub #522 (Ian)
|
||||
repmgr: add "node check --data-directory-config"; GitHub #523 (Ian)
|
||||
repmgr: prevent potential race condition in "standby switchover"
|
||||
|
||||
@@ -81,7 +81,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Add <option>--terse</option> option to <command><link linkend="repmgr-cluster-show">repmgr cluster show</link></command> (GitHub #521).
|
||||
Add <option>--compact</option> option to <command><link linkend="repmgr-cluster-show">repmgr cluster show</link></command> (GitHub #521).
|
||||
</para>
|
||||
<para>
|
||||
This makes it easier to copy the output into emails, chats etc. as a compact table.
|
||||
|
||||
@@ -120,11 +120,20 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--compact</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Suppress display of the <literal>conninfo</literal> column.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--terse</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Suppress display of the <literal>conninfo</literal> column.
|
||||
Suppress warnings about connection issues.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -120,7 +120,7 @@ do_cluster_show(void)
|
||||
{
|
||||
headers_show[i].display = true;
|
||||
|
||||
if (runtime_options.terse == true)
|
||||
if (runtime_options.compact == true)
|
||||
{
|
||||
if (i == SHOW_CONNINFO)
|
||||
{
|
||||
@@ -361,7 +361,7 @@ do_cluster_show(void)
|
||||
|
||||
for (i = 0; i < SHOW_HEADER_COUNT; i++)
|
||||
{
|
||||
if (runtime_options.terse == true)
|
||||
if (runtime_options.compact == true)
|
||||
{
|
||||
if (headers_show[i].display == false)
|
||||
continue;
|
||||
@@ -1518,6 +1518,7 @@ do_cluster_help(void)
|
||||
printf(_(" Configuration file or database connection required.\n"));
|
||||
puts("");
|
||||
printf(_(" --csv emit output as CSV (with a subset of fields)\n"));
|
||||
printf(_(" --compact display only a subset of fields\n"));
|
||||
puts("");
|
||||
|
||||
printf(_("CLUSTER MATRIX\n"));
|
||||
|
||||
@@ -44,6 +44,7 @@ typedef struct
|
||||
char pg_bindir[MAXLEN]; /* overrides setting in repmgr.conf */
|
||||
int wait;
|
||||
bool no_wait;
|
||||
bool compact;
|
||||
|
||||
/* logging options */
|
||||
char log_level[MAXLEN]; /* overrides setting in repmgr.conf */
|
||||
@@ -140,7 +141,7 @@ typedef struct
|
||||
/* configuration metadata */ \
|
||||
false, false, false, false, false, \
|
||||
/* general configuration options */ \
|
||||
"", false, false, "", -1, false, \
|
||||
"", false, false, "", -1, false, false, \
|
||||
/* logging options */ \
|
||||
"", false, false, false, false, \
|
||||
/* output options */ \
|
||||
|
||||
@@ -267,6 +267,12 @@ main(int argc, char **argv)
|
||||
runtime_options.no_wait = true;
|
||||
break;
|
||||
|
||||
/* --compact */
|
||||
case OPT_COMPACT:
|
||||
runtime_options.compact = true;
|
||||
break;
|
||||
|
||||
|
||||
/*----------------------------
|
||||
* database connection options
|
||||
*----------------------------
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
#define OPT_REPMGRD_NO_PAUSE 1042
|
||||
#define OPT_VERSION_NUMBER 1043
|
||||
#define OPT_DATA_DIRECTORY_CONFIG 1044
|
||||
#define OPT_COMPACT 1045
|
||||
|
||||
|
||||
/* deprecated since 3.3 */
|
||||
@@ -118,6 +119,7 @@ static struct option long_options[] =
|
||||
{"pg_bindir", required_argument, NULL, 'b'},
|
||||
{"wait", optional_argument, NULL, 'w'},
|
||||
{"no-wait", no_argument, NULL, 'W'},
|
||||
{"compact", no_argument, NULL, OPT_COMPACT},
|
||||
|
||||
/* connection options */
|
||||
{"dbname", required_argument, NULL, 'd'},
|
||||
|
||||
Reference in New Issue
Block a user