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 1nCLWz-0001tY-A6 for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Jan 2022 13:06:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nCLWw-0002fv-9W for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Jan 2022 13:06:38 +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 1nCLWv-0002fm-Eu for pgsql-hackers@lists.postgresql.org; Tue, 25 Jan 2022 13:06:38 +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 1nCLWs-0003kv-Qq for pgsql-hackers@postgresql.org; Tue, 25 Jan 2022 13:06:37 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id C10C6320100E; Tue, 25 Jan 2022 08:06:31 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 25 Jan 2022 08:06: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=02G3+YPZQKK9GM5lS5mH+OX0seePxlDKFUyd7E DGWMM=; b=vAgIMbMY6h+fmsTVFCpiq/jqXpGSiCvpRJPuY3qJKaVUJ49qqpQKsc hGGFySNPF9Zl3tTgICo/km3evZq97OpozidR/aGFWAFOxE1CMRwkYhDwk/q8zTLZ tR7DZI9C9DpvJ3cZcUxgrQWEU3B4WDZmkoPJLZ+oqqc3+Hzxsv2w02zpSFeZVsDW o7i7eCNTUBEzSFDnJIrrXgDjzl+HlIi4DgteF4xpMWGt72wK2NhtJIX0jVjVrP2w sTLrhgjwF8HDtDmdKFyeSot7PhvWqEadHnbOvyDrPiooH2hWZBQC4Cugxt0cxCOq S4lzG/QdqY15TWRlwuksuQeeAYnhETIA== 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=02G3+YPZQKK9GM5lS 5mH+OX0seePxlDKFUyd7EDGWMM=; b=Hoh+ldU0G0x4pcsWOAB+FJL1wunxF44U/ KTYBkGK5cBH8fpDpjgPZcJzjiORHW5McH0o6//JgIZ5w8da1aMn9dg2sQEu0pYJg eHuleOgx2RdlcRWjNr5h/4ilwYbgxCtgacihQhKhGRrSRQAeKfDtdcCI0lvivcHQ WhbucCwcIXLVZ7rHV/7dhG5q+nNv3dfpHr7l0iR6ie3sT8hZf+y9Z4kRQol6tCU7 CwDtGqDxFkLtkWAjSUqUT0AbvDUabieMMxpiBgfuttnC6lvtDNkZwnr1fEHg6gX6 QQ7nFmbID8Ip4zWMhCFZfzk88trBKJFp7RZ+T5GBhOG+i3U7Qc+kg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdelgdegiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufhffjgfkfgggtgesmhdtreertderjeenucfhrhhomhepffgrghhfihhn nhgpkfhlmhgrrhhipgforghnnhhsnohkvghruceoihhlmhgrrhhisehilhhmrghrihdroh hrgheqnecuggftrfgrthhtvghrnhepteevieehteetleeglefghfefkeejheelledttedt gfdvkeffheffvdekheeuudffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepihhlmhgrrhhisehilhhmrghrihdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 Jan 2022 08:06: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> Date: Tue, 25 Jan 2022 13:06:27 +0000 In-Reply-To: (Noriyoshi Shinoda's message of "Tue, 25 Jan 2022 03:54:52 +0000") Message-ID: <87k0eo0xt8.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 "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. - ilmari --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-pg_basebackup-documentation-and-help-fixes.patch From 8e3d191917984a6d17f2c72212d90c96467463b0 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] 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 @@ [: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 --=-=-=--