Skip to content

Commit 3ce7f72

Browse files
committed
pg_basebackup: Remove short option -k
-k meant --no-verify-checksums, which is the opposite of what initdb uses -k for. After discussion, a short option does not seem necessary, so just keep the long option. Discussion: https://www.postgresql.org/message-id/flat/d510f8aa-19e1-d06e-7630-ad27f7441d68%402ndquadrant.com
1 parent 81256cd commit 3ce7f72

File tree

3 files changed

+23
-24
lines changed

3 files changed

+23
-24
lines changed

doc/src/sgml/ref/pg_basebackup.sgml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,18 @@ PostgreSQL documentation
486486
</listitem>
487487
</varlistentry>
488488

489+
<varlistentry>
490+
<term><option>-v</option></term>
491+
<term><option>--verbose</option></term>
492+
<listitem>
493+
<para>
494+
Enables verbose mode. Will output some extra steps during startup and
495+
shutdown, as well as show the exact file name that is currently being
496+
processed if progress reporting is also enabled.
497+
</para>
498+
</listitem>
499+
</varlistentry>
500+
489501
<varlistentry>
490502
<term><option>--no-slot</option></term>
491503
<listitem>
@@ -507,33 +519,20 @@ PostgreSQL documentation
507519
</varlistentry>
508520

509521
<varlistentry>
510-
<term><option>-k</option></term>
511522
<term><option>--no-verify-checksums</option></term>
512523
<listitem>
513524
<para>
514525
Disables verification of checksums, if they are enabled on the server
515-
the base backup is taken from.
526+
the base backup is taken from.
516527
</para>
517528
<para>
518-
By default, checksums are verified and checksum failures will result in
519-
a non-zero exit status. However, the base backup will not be removed in
520-
this case, as if the <literal>--no-clean</literal> option was used.
529+
By default, checksums are verified and checksum failures will result
530+
in a non-zero exit status. However, the base backup will not be
531+
removed in such a case, as if the <option>--no-clean</option> option
532+
had been used.
521533
</para>
522534
</listitem>
523535
</varlistentry>
524-
525-
<varlistentry>
526-
<term><option>-v</option></term>
527-
<term><option>--verbose</option></term>
528-
<listitem>
529-
<para>
530-
Enables verbose mode. Will output some extra steps during startup and
531-
shutdown, as well as show the exact file name that is currently being
532-
processed if progress reporting is also enabled.
533-
</para>
534-
</listitem>
535-
</varlistentry>
536-
537536
</variablelist>
538537
</para>
539538

src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,11 +363,11 @@ usage(void)
363363
printf(_(" -N, --no-sync do not wait for changes to be written safely to disk\n"));
364364
printf(_(" -P, --progress show progress information\n"));
365365
printf(_(" -S, --slot=SLOTNAME replication slot to use\n"));
366-
printf(_(" --no-slot prevent creation of temporary replication slot\n"));
367-
printf(_(" -k, --no-verify-checksums\n"
368-
" do not verify checksums\n"));
369366
printf(_(" -v, --verbose output verbose messages\n"));
370367
printf(_(" -V, --version output version information, then exit\n"));
368+
printf(_(" --no-slot prevent creation of temporary replication slot\n"));
369+
printf(_(" --no-verify-checksums\n"
370+
" do not verify checksums\n"));
371371
printf(_(" -?, --help show this help, then exit\n"));
372372
printf(_("\nConnection options:\n"));
373373
printf(_(" -d, --dbname=CONNSTR connection string\n"));
@@ -2159,7 +2159,7 @@ main(int argc, char **argv)
21592159
{"progress", no_argument, NULL, 'P'},
21602160
{"waldir", required_argument, NULL, 1},
21612161
{"no-slot", no_argument, NULL, 2},
2162-
{"no-verify-checksums", no_argument, NULL, 'k'},
2162+
{"no-verify-checksums", no_argument, NULL, 3},
21632163
{NULL, 0, NULL, 0}
21642164
};
21652165
int c;
@@ -2328,7 +2328,7 @@ main(int argc, char **argv)
23282328
case 'P':
23292329
showprogress = true;
23302330
break;
2331-
case 'k':
2331+
case 3:
23322332
verify_checksums = false;
23332333
break;
23342334
default:

src/bin/pg_basebackup/t/010_pg_basebackup.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@
552552

553553
# do not verify checksums, should return ok
554554
$node->command_ok(
555-
[ 'pg_basebackup', '-D', "$tempdir/backup_corrupt4", '-k' ],
555+
[ 'pg_basebackup', '-D', "$tempdir/backup_corrupt4", '--no-verify-checksums' ],
556556
'pg_basebackup with -k does not report checksum mismatch');
557557
rmtree("$tempdir/backup_corrupt4");
558558

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy