"Shinoda, Noriyoshi (PN Japan FSIP)" <noriyoshi.shin...@hpe.com> writes:
> Hi, > Thank you for committing a great feature. I have tested the committed > features. > The attached small patch fixes the output of the --help message. In the > previous commit, only gzip and none were output, but in the attached > patch, client-gzip and server-gzip are added. I think it would be better to write that as `[{client,server}-]gzip`, especially as we add more compression agorithms, where it would presumably become `[{client,server}-]METHOD` (assuming all methods are supported on both the client and server side). I also noticed that in the docs, the `client` and `server` are marked up as replaceable parameters, when they are actually literals, plus the hyphen is misplaced. The `--checkpoint` option also has the `fast` and `spread` literals marked up as parameters. All of these are fixed in the attached patch. - ilmari
>From 8e3d191917984a6d17f2c72212d90c96467463b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilm...@ilmari.org> Date: Tue, 25 Jan 2022 13:04:05 +0000 Subject: [PATCH] pg_basebackup documentation and help fixes Don't mark up literals as replaceable parameters and indicate alternatives correctly with {...|...}. --- doc/src/sgml/ref/pg_basebackup.sgml | 6 +++--- src/bin/pg_basebackup/pg_basebackup.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml index 1d0df346b9..98c89751b3 100644 --- a/doc/src/sgml/ref/pg_basebackup.sgml +++ b/doc/src/sgml/ref/pg_basebackup.sgml @@ -400,7 +400,7 @@ <term><option>-Z <replaceable class="parameter">level</replaceable></option></term> <term><option>-Z <replaceable class="parameter">method</replaceable></option>[:<replaceable>level</replaceable>]</term> <term><option>--compress=<replaceable class="parameter">level</replaceable></option></term> - <term><option>--compress=[[{<replaceable class="parameter">client|server</replaceable>-}]<replaceable class="parameter">method</replaceable></option>[:<replaceable>level</replaceable>]</term> + <term><option>--compress=[[{client|server}-]<replaceable class="parameter">method</replaceable></option>[:<replaceable>level</replaceable>]</term> <listitem> <para> Requests compression of the backup. If <literal>client</literal> or @@ -441,8 +441,8 @@ <variablelist> <varlistentry> - <term><option>-c <replaceable class="parameter">fast|spread</replaceable></option></term> - <term><option>--checkpoint=<replaceable class="parameter">fast|spread</replaceable></option></term> + <term><option>-c {fast|spread}</option></term> + <term><option>--checkpoint={fast|spread}</option></term> <listitem> <para> Sets checkpoint mode to fast (immediate) or spread (the default) diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index 72c27c78d0..46f6f53e9b 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -391,7 +391,7 @@ usage(void) printf(_(" -X, --wal-method=none|fetch|stream\n" " include required WAL files with specified method\n")); printf(_(" -z, --gzip compress tar output\n")); - printf(_(" -Z, --compress={gzip,none}[:LEVEL] or [LEVEL]\n" + printf(_(" -Z, --compress={[{client,server}-]gzip,none}[:LEVEL] or [LEVEL]\n" " compress tar output with given compression method or level\n")); printf(_("\nGeneral options:\n")); printf(_(" -c, --checkpoint=fast|spread\n" -- 2.30.2