Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nCM5n-0003Vi-96 for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Jan 2022 13:42:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nCM5l-0000Eo-9f for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Jan 2022 13:42:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nCM5k-0000Ec-Vl for pgsql-hackers@lists.postgresql.org; Tue, 25 Jan 2022 13:42:37 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nCM5i-00046i-Nn for pgsql-hackers@postgresql.org; Tue, 25 Jan 2022 13:42:36 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 495A93200583; Tue, 25 Jan 2022 08:42:31 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 25 Jan 2022 08:42:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilmari.org; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; bh=CsJFQek1xeuCZRfHvokzbSkGV9zGlZ1k0oFZx/ ZeSIw=; b=P7jC3Yu/Doffqh+kf+YBYoS/gsw8pOWJSN22mshNNZE7EvaDHvK4iS feU1LiC0gPnO9RrgDeK6K7LFKhByojOJtmVF5fNBySMFWHHMhdD/6ltAw/7l5h+x sTV4LuxOnDcQx2qphSNB50aKzMXOVAKUGL+uKlMskw5tvO69CxyvJPQDgi1mCGaG MaIPEBhQSmTOwwlgUTd0K+vFZpWjRCy0oN84GwD1DfaKsQeQV1a1I3L90vMQDBR/ Xj7qGrS+LcygRWCZVxyd7YX8RfCpaR9XkCkXyc/iLMw82OWmbCt31AJI25TCrLkc Lzn8PqLC+ztOHiMT+lXsOXaWumns2+cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=CsJFQek1xeuCZRfHv okzbSkGV9zGlZ1k0oFZx/ZeSIw=; b=nP5/D/vShQx3CVzgHa3fG/Jq57Gw3pSrn n1In/APeZ8sBM8NxbW3tKsQczi7ApGJh8brD5IuzHI8atls3RZ3aojMBnaAz5xAs IvYLDExAKm4KV7rqG6ihJhlHE5gCTVzwrvfkGmz9nps7DXHvqHqZwYa6+GGL2aQb Gxmk2QIMtL3spSJJCxOgjYaaDtWHl9CeDlN53eojNQw9gmux9XZ6O4SfEONPXZJ9 B6DmK0KT1C1x3QGFSerj1D4b+LgGWOAv15Q5YN2rHi+wN8+0lwvQod4Fx6trMIvm W1uhRX734fydIoYunEMPEgpcjouR0S/f8bdfZE0gUGPjH70uxb7PA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdelgdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufhffjgfkfgggtgesmhdtreertderjeenucfhrhhomhepffgrghhfihhn nhgpkfhlmhgrrhhipgforghnnhhsnohkvghruceoihhlmhgrrhhisehilhhmrghrihdroh hrgheqnecuggftrfgrthhtvghrnhepteevieehteetleeglefghfefkeejheelledttedt gfdvkeffheffvdekheeuudffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepihhlmhgrrhhisehilhhmrghrihdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 Jan 2022 08:42:29 -0500 (EST) From: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= To: "Shinoda, Noriyoshi (PN Japan FSIP)" Cc: Robert Haas , Dipesh Pandit , Michael Paquier , Jeevan Ladhe , tushar , Dmitry Dolgov <9erthalion6@gmail.com>, "Mark Dilger" , "pgsql-hackers@postgresql.org" Subject: Re: refactoring basebackup.c References: <20211115162641.dmo6l32fklh64gnw@localhost> <87k0eo0xt8.fsf@wibble.ilmari.org> Date: Tue, 25 Jan 2022 13:42:27 +0000 In-Reply-To: <87k0eo0xt8.fsf@wibble.ilmari.org> ("Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker=22's?= message of "Tue, 25 Jan 2022 13:06:27 +0000") Message-ID: <87h79s0w58.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Dagfinn Ilmari Mannsåker writes: > "Shinoda, Noriyoshi (PN Japan FSIP)" 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v2-0001-pg_basebackup-documentation-and-help-fixes.patch From 2164f1a9fc97a5f88f57c7cc9cdafa67398dcc0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= 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.sgml index 1d0df346b9..a5e03d2c66 100644 --- a/doc/src/sgml/ref/pg_basebackup.sgml +++ b/doc/src/sgml/ref/pg_basebackup.sgml @@ -398,9 +398,9 @@ - [:level] + [:level] - [:level] + [:level] Requests compression of the backup. If client or @@ -441,8 +441,8 @@ - - + + 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 --=-=-=--