From: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
To: Shinoda, Noriyoshi (PN Japan FSIP) <noriyoshi.shinoda@hpe.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Dipesh Pandit <dipesh.pandit@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Cc: tushar <tushar.ahuja@enterprisedb.com>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Mark Dilger <mark.dilger@enterprisedb.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: refactoring basebackup.c
Date: Tue, 25 Jan 2022 13:42:27 +0000
Message-ID: <87h79s0w58.fsf@wibble.ilmari.org> (raw)
In-Reply-To: <87k0eo0xt8.fsf@wibble.ilmari.org>
References: <CAOgcT0OarU7csuf6Obgmg96DdjpGKUSETx5d6ss3eJx7VD+bdA@mail.gmail.com>
<CA+TgmobnZT4JKVNfAhWru951HA8P7SBNdCbJvCxAXu0=2+6WdA@mail.gmail.com>
<CAOgcT0P0OGFfNhCKRUyV-rGMXk+JnsYUKGF3tPYhog2c1EQAmg@mail.gmail.com>
<CA+TgmoY_kqYZdpuXLvcX9wj=8Lq6votwT-UJyMDE0btkOTyiWQ@mail.gmail.com>
<CAOgcT0OeWuX+O=-5OTL8VWdjCaCh0HKDoKHDRq1zUfUrdXCnsw@mail.gmail.com>
<CA+TgmoZvqk7UuzxsX1xjJRmMGkqoUGYTZLDCH8SmU1xTPr1Xig@mail.gmail.com>
<CA+TgmobrOXbDh+hCzzVkD3weV3R-QRy3SPa=FRb_Rv9wF5iPJw@mail.gmail.com>
<20211115162641.dmo6l32fklh64gnw@localhost>
<CA+TgmoYScZ-wKtc+s_mLqSGGskd=vPb0Yh8ci_yQUgfNYG9rLQ@mail.gmail.com>
<CA+TgmoaYZbz0=Yk797aOJwkGJC-LK3iXn+wzzMx7KdwNpZhS5g@mail.gmail.com>
<CAOgcT0N+Nwjx1M_ZP9vr7P_gX9ftMjNrsK6JSYRawdjvTQ7k5A@mail.gmail.com>
<b9a7a67e-d71a-6d0c-cc59-0ae63e2b2040@enterprisedb.com>
<CAOgcT0NH+DRkj6pr51DsYyPg73Fuj-uLpr707akfZcbaxTqdvQ@mail.gmail.com>
<CAC6VRoYRJkzRxU_TVG7PMGMn5+Eb-VSOiO+mVaj2WUyeF9DpkA@mail.gmail.com>
<CAOgcT0NBurXSm+ZeF=PiBcAm9mywHFo6Jc9G+F7JFU8O9sndBQ@mail.gmail.com>
<CA+TgmoZ5_j+ZLf66_EioReGXvYTCkgQZju9SDq8yg_QbY_1vTw@mail.gmail.com>
<CAN1g5_FSqShfWKibkCrJr45hHtRCBQUUtGVEHn4wNv=YCkybtQ@mail.gmail.com>
<CA+TgmobQYkP81QQgS6tvvt4cRxvmipHQ4eU-aNjSpiZJhdkckA@mail.gmail.com>
<CA+Tgmoa-ST7fMLsVJduOB7Eub=2WjfpHS+QxHVEpUoinf4bOSg@mail.gmail.com>
<PH7PR84MB1885C1CF433057807551172BEE5F9@PH7PR84MB1885.NAMPRD84.PROD.OUTLOOK.COM>
<87k0eo0xt8.fsf@wibble.ilmari.org>
Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> writes:
> "Shinoda, Noriyoshi (PN Japan FSIP)" <noriyoshi.shinoda@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.
I just noticed there was a superfluous [ in the SGM documentation, and
that the short form was missing the [{client|server}-] part. Updated
patch attaced.
- ilmari
Attachments:v2-0001-pg_basebackup-documentation-and-help-fixes.patch (text/x-diff, 2.9K) download
From 2164f1a9fc97a5f88f57c7cc9cdafa67398dcc0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org>
Date: Tue, 25 Jan 2022 13:04:05 +0000
Subject: [PATCH v2] pg_basebackup documentation and help fixes
Don't mark up literals as replaceable parameters and indicate alternatives
correctly with {...|...}, and add missing [{client,server}-] to the
-Z form.---
doc/src/sgml/ref/pg_basebackup.sgml | 8 ++++----
src/bin/pg_basebackup/pg_basebackup.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgmlindex 1d0df346b9..a5e03d2c66 100644--- a/doc/src/sgml/ref/pg_basebackup.sgml+++ b/doc/src/sgml/ref/pg_basebackup.sgml@@ -398,9 +398,9 @@
<varlistentry>
<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>-Z [{client|server}-]<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.cindex 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: ilmari@ilmari.org, noriyoshi.shinoda@hpe.com, robertmhaas@gmail.com, dipesh.pandit@gmail.com, michael@paquier.xyz, jeevan.ladhe@enterprisedb.com, tushar.ahuja@enterprisedb.com, 9erthalion6@gmail.com, mark.dilger@enterprisedb.com
Subject: Re: refactoring basebackup.c
In-Reply-To: <87h79s0w58.fsf@wibble.ilmari.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox