pg_basebackup -k option
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
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
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.patchtext/x-diff; charset=us-asciiDownload
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:
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/>
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