Hi,

On Fri, May 18, 2018 at 10:46:37AM -0400, Tom Lane wrote:
> Peter Eisentraut <peter.eisentr...@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.ba...@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
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:

Reply via email to