Commit 3ce7f725 authored by Peter Eisentraut's avatar Peter Eisentraut

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
parent 81256cd0
...@@ -486,6 +486,18 @@ PostgreSQL documentation ...@@ -486,6 +486,18 @@ PostgreSQL documentation
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>-v</option></term>
<term><option>--verbose</option></term>
<listitem>
<para>
Enables verbose mode. Will output some extra steps during startup and
shutdown, as well as show the exact file name that is currently being
processed if progress reporting is also enabled.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>--no-slot</option></term> <term><option>--no-slot</option></term>
<listitem> <listitem>
...@@ -507,33 +519,20 @@ PostgreSQL documentation ...@@ -507,33 +519,20 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>-k</option></term>
<term><option>--no-verify-checksums</option></term> <term><option>--no-verify-checksums</option></term>
<listitem> <listitem>
<para> <para>
Disables verification of checksums, if they are enabled on the server Disables verification of checksums, if they are enabled on the server
the base backup is taken from. the base backup is taken from.
</para> </para>
<para> <para>
By default, checksums are verified and checksum failures will result in By default, checksums are verified and checksum failures will result
a non-zero exit status. However, the base backup will not be removed in in a non-zero exit status. However, the base backup will not be
this case, as if the <literal>--no-clean</literal> option was used. removed in such a case, as if the <option>--no-clean</option> option
had been used.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>-v</option></term>
<term><option>--verbose</option></term>
<listitem>
<para>
Enables verbose mode. Will output some extra steps during startup and
shutdown, as well as show the exact file name that is currently being
processed if progress reporting is also enabled.
</para>
</listitem>
</varlistentry>
</variablelist> </variablelist>
</para> </para>
......
...@@ -363,11 +363,11 @@ usage(void) ...@@ -363,11 +363,11 @@ usage(void)
printf(_(" -N, --no-sync do not wait for changes to be written safely to disk\n")); printf(_(" -N, --no-sync do not wait for changes to be written safely to disk\n"));
printf(_(" -P, --progress show progress information\n")); printf(_(" -P, --progress show progress information\n"));
printf(_(" -S, --slot=SLOTNAME replication slot to use\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"
" do not verify checksums\n"));
printf(_(" -v, --verbose output verbose messages\n")); printf(_(" -v, --verbose output verbose messages\n"));
printf(_(" -V, --version output version information, then exit\n")); printf(_(" -V, --version output version information, then exit\n"));
printf(_(" --no-slot prevent creation of temporary replication slot\n"));
printf(_(" --no-verify-checksums\n"
" do not verify checksums\n"));
printf(_(" -?, --help show this help, then exit\n")); printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nConnection options:\n")); printf(_("\nConnection options:\n"));
printf(_(" -d, --dbname=CONNSTR connection string\n")); printf(_(" -d, --dbname=CONNSTR connection string\n"));
...@@ -2159,7 +2159,7 @@ main(int argc, char **argv) ...@@ -2159,7 +2159,7 @@ main(int argc, char **argv)
{"progress", no_argument, NULL, 'P'}, {"progress", no_argument, NULL, 'P'},
{"waldir", required_argument, NULL, 1}, {"waldir", required_argument, NULL, 1},
{"no-slot", no_argument, NULL, 2}, {"no-slot", no_argument, NULL, 2},
{"no-verify-checksums", no_argument, NULL, 'k'}, {"no-verify-checksums", no_argument, NULL, 3},
{NULL, 0, NULL, 0} {NULL, 0, NULL, 0}
}; };
int c; int c;
...@@ -2328,7 +2328,7 @@ main(int argc, char **argv) ...@@ -2328,7 +2328,7 @@ main(int argc, char **argv)
case 'P': case 'P':
showprogress = true; showprogress = true;
break; break;
case 'k': case 3:
verify_checksums = false; verify_checksums = false;
break; break;
default: default:
......
...@@ -552,7 +552,7 @@ rmtree("$tempdir/backup_corrupt3"); ...@@ -552,7 +552,7 @@ rmtree("$tempdir/backup_corrupt3");
# do not verify checksums, should return ok # do not verify checksums, should return ok
$node->command_ok( $node->command_ok(
[ 'pg_basebackup', '-D', "$tempdir/backup_corrupt4", '-k' ], [ 'pg_basebackup', '-D', "$tempdir/backup_corrupt4", '--no-verify-checksums' ],
'pg_basebackup with -k does not report checksum mismatch'); 'pg_basebackup with -k does not report checksum mismatch');
rmtree("$tempdir/backup_corrupt4"); rmtree("$tempdir/backup_corrupt4");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment