From: Michael Banck <michael.banck@credativ.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: pg_basebackup -k option
Date: Fri, 18 May 2018 17:26:19 +0200
Message-ID: <20180518152619.GA11887@nighthawk.caipicrew.dd-dns.de> (raw)
In-Reply-To: <29277.1526654797@sss.pgh.pa.us>
References: <d510f8aa-19e1-d06e-7630-ad27f7441d68@2ndquadrant.com>
<29277.1526654797@sss.pgh.pa.us>
Hi,
On Fri, May 18, 2018 at 10:46:37AM -0400, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> 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
Attachments:pg_basebackup_verify_checksums_no_short_option.patch (text/x-diff, 1.2K) downloaddiff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.cindex 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:
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: michael.banck@credativ.de, tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com
Subject: Re: pg_basebackup -k option
In-Reply-To: <20180518152619.GA11887@nighthawk.caipicrew.dd-dns.de>
References: <d510f8aa-19e1-d06e-7630-ad27f7441d68@2ndquadrant.com> <29277.1526654797@sss.pgh.pa.us> <20180518152619.GA11887@nighthawk.caipicrew.dd-dns.de>
* 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