pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_basebackup -k option
6+ messages / 5 participants
[nested] [flat]

Commits from this thread:
  2018-05-21 3ce7f72529  pg_basebackup: Remove short option -k
* pg_basebackup -k option
@ 2018-05-18 14:36 Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  2018-05-18 14:45 ` Re: pg_basebackup -k option Sergei Kornilov <sk@zsrv.org>
  2018-05-18 14:46 ` Re: pg_basebackup -k option Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 6+ messages in thread

From: Peter Eisentraut @ 2018-05-18 14:36 UTC (permalink / raw)
  To: pgsql-hackers

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.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pg_basebackup -k option
  2018-05-18 14:36 pg_basebackup -k option Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
@ 2018-05-18 14:45 ` Sergei Kornilov <sk@zsrv.org>
  1 sibling, 0 replies; 6+ messages in thread

From: Sergei Kornilov @ 2018-05-18 14:45 UTC (permalink / raw)
  To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

Hi
I think having only long option is enough

regards, Sergei




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pg_basebackup -k option
  2018-05-18 14:36 pg_basebackup -k option Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
@ 2018-05-18 14:46 ` Tom Lane <tgl@sss.pgh.pa.us>
  2018-05-18 15:26   ` Re: pg_basebackup -k option Michael Banck <michael.banck@credativ.de>
  2018-05-18 15:29   ` Re: pg_basebackup -k option Magnus Hagander <magnus@hagander.net>
  1 sibling, 2 replies; 6+ messages in thread

From: Tom Lane @ 2018-05-18 14:46 UTC (permalink / raw)
  To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: pgsql-hackers

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.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pg_basebackup -k option
  2018-05-18 14:36 pg_basebackup -k option Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  2018-05-18 14:46 ` Re: pg_basebackup -k option Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-05-18 15:26   ` Michael Banck <michael.banck@credativ.de>
  2018-05-21 14:27     ` Re: pg_basebackup -k option Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Michael Banck @ 2018-05-18 15:26 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

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) download 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:
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: pg_basebackup -k option
  2018-05-18 14:36 pg_basebackup -k option Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  2018-05-18 14:46 ` Re: pg_basebackup -k option Tom Lane <tgl@sss.pgh.pa.us>
  2018-05-18 15:26   ` Re: pg_basebackup -k option Michael Banck <michael.banck@credativ.de>
@ 2018-05-21 14:27     ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Peter Eisentraut @ 2018-05-21 14:27 UTC (permalink / raw)
  To: Michael Banck <michael.banck@credativ.de>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers

On 5/18/18 11:26, Michael Banck wrote:
>>> 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.

committed (needed test and documentation adjustments, too)

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pg_basebackup -k option
  2018-05-18 14:36 pg_basebackup -k option Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  2018-05-18 14:46 ` Re: pg_basebackup -k option Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-05-18 15:29   ` Magnus Hagander <magnus@hagander.net>
  1 sibling, 0 replies; 6+ messages in thread

From: Magnus Hagander @ 2018-05-18 15:29 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-hackers

On Fri, May 18, 2018 at 4:46 PM, Tom Lane <tgl@sss.pgh.pa.us> 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.
>

+1 for that choice as well.

-- 
 Magnus Hagander
 Me: https://www.hagander.net/ <http://www.hagander.net/;
 Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/;

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2018-05-21 14:27 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-05-18 14:36 pg_basebackup -k option Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2018-05-18 14:45 ` Sergei Kornilov <sk@zsrv.org>
2018-05-18 14:46 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-05-18 15:26   ` Michael Banck <michael.banck@credativ.de>
2018-05-21 14:27     ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2018-05-18 15:29   ` Magnus Hagander <magnus@hagander.net>

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