Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fJhK2-0007Ld-6H for pgsql-hackers@arkaria.postgresql.org; Fri, 18 May 2018 15:29:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fJhK0-00047h-T7 for pgsql-hackers@arkaria.postgresql.org; Fri, 18 May 2018 15:29:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fJhK0-00047X-Ln for pgsql-hackers@lists.postgresql.org; Fri, 18 May 2018 15:29:32 +0000 Received: from mout.gmx.net ([212.227.17.22]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fJhJx-00020o-2j for pgsql-hackers@postgresql.org; Fri, 18 May 2018 15:29:32 +0000 Received: from nighthawk.chemicalconnection.dyndns.org ([88.217.119.180]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MUYiV-1esvEu2jmV-00RIAI; Fri, 18 May 2018 17:29:23 +0200 Received: from mbanck by nighthawk.chemicalconnection.dyndns.org with local (Exim 4.84_2) (envelope-from ) id 1fJhGt-0005Fj-PS; Fri, 18 May 2018 17:26:19 +0200 Date: Fri, 18 May 2018 17:26:19 +0200 From: Michael Banck To: Tom Lane Cc: Peter Eisentraut , pgsql-hackers Subject: Re: pg_basebackup -k option Message-ID: <20180518152619.GA11887@nighthawk.caipicrew.dd-dns.de> References: <29277.1526654797@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <29277.1526654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VP 8CRsoDUoPLPYIR6oruQvNjrOr9B6xcKf9K3Ax6s0wRCPnnTaoDEEglfLUFk= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi, On Fri, May 18, 2018 at 10:46:37AM -0400, Tom Lane wrote: > Peter Eisentraut writes: > > The new pg_basebackup -k option stands for --no-verify-checksums. That > > is nearly the opposite of initdb -k, which is for enabling checksums. I > > think it could be confusing to have two related tools use the same > > option letter for nearly opposite purposes. > > > How about using capital -K in pg_basebackup? Or maybe it doesn't need a > > short option at all. > > +1 for no short option. Makes sense to me, I wasn't happy about the -k back then (and I think I solicited feedback on that). PFA a patch which should remove the short option. Michael -- Michael Banck Projektleiter / Senior Berater Tel.: +49 2166 9901-171 Fax: +49 2166 9901-100 Email: michael.banck@credativ.de credativ GmbH, HRB Mönchengladbach 12080 USt-ID-Nummer: DE204566209 Trompeterallee 108, 41189 Mönchengladbach Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer --k+w/mQv8wyuph6w0 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="pg_basebackup_verify_checksums_no_short_option.patch" diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index 58f780c069..0ebca732a4 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -364,7 +364,7 @@ usage(void) printf(_(" -P, --progress show progress information\n")); printf(_(" -S, --slot=SLOTNAME replication slot to use\n")); printf(_(" --no-slot prevent creation of temporary replication slot\n")); - printf(_(" -k, --no-verify-checksums\n" + printf(_(" --no-verify-checksums\n" " do not verify checksums\n")); printf(_(" -v, --verbose output verbose messages\n")); printf(_(" -V, --version output version information, then exit\n")); @@ -2159,7 +2159,7 @@ main(int argc, char **argv) {"progress", no_argument, NULL, 'P'}, {"waldir", required_argument, NULL, 1}, {"no-slot", no_argument, NULL, 2}, - {"no-verify-checksums", no_argument, NULL, 'k'}, + {"no-verify-checksums", no_argument, NULL, 3}, {NULL, 0, NULL, 0} }; int c; @@ -2328,7 +2328,7 @@ main(int argc, char **argv) case 'P': showprogress = true; break; - case 'k': + case 3: verify_checksums = false; break; default: --k+w/mQv8wyuph6w0--