mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
Remove -f option from pg_verify_checksums
This option makes no sense when the cluster checksum state cannot be changed, and should have been removed in the revert. Author: Daniel Gustafsson Review: Michael Paquier
This commit is contained in:
parent
49ac4039b2
commit
44e2df461f
@ -52,15 +52,6 @@ PostgreSQL documentation
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><option>-f</option></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Force check even if checksums are disabled on cluster.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-d</option></term>
|
<term><option>-d</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -42,7 +42,6 @@ usage()
|
|||||||
printf(_(" %s [OPTION] [DATADIR]\n"), progname);
|
printf(_(" %s [OPTION] [DATADIR]\n"), progname);
|
||||||
printf(_("\nOptions:\n"));
|
printf(_("\nOptions:\n"));
|
||||||
printf(_(" [-D] DATADIR data directory\n"));
|
printf(_(" [-D] DATADIR data directory\n"));
|
||||||
printf(_(" -f, force check even if checksums are disabled\n"));
|
|
||||||
printf(_(" -r relfilenode check only relation with specified relfilenode\n"));
|
printf(_(" -r relfilenode check only relation with specified relfilenode\n"));
|
||||||
printf(_(" -d debug output, listing all checked blocks\n"));
|
printf(_(" -d debug output, listing all checked blocks\n"));
|
||||||
printf(_(" -V, --version output version information, then exit\n"));
|
printf(_(" -V, --version output version information, then exit\n"));
|
||||||
@ -202,7 +201,6 @@ int
|
|||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
char *DataDir = NULL;
|
char *DataDir = NULL;
|
||||||
bool force = false;
|
|
||||||
int c;
|
int c;
|
||||||
bool crc_ok;
|
bool crc_ok;
|
||||||
|
|
||||||
@ -224,7 +222,7 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "D:fr:d")) != -1)
|
while ((c = getopt(argc, argv, "D:r:d")) != -1)
|
||||||
{
|
{
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
@ -234,9 +232,6 @@ main(int argc, char *argv[])
|
|||||||
case 'D':
|
case 'D':
|
||||||
DataDir = optarg;
|
DataDir = optarg;
|
||||||
break;
|
break;
|
||||||
case 'f':
|
|
||||||
force = true;
|
|
||||||
break;
|
|
||||||
case 'r':
|
case 'r':
|
||||||
if (atoi(optarg) <= 0)
|
if (atoi(optarg) <= 0)
|
||||||
{
|
{
|
||||||
@ -292,7 +287,7 @@ main(int argc, char *argv[])
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ControlFile->data_checksum_version == 0 && !force)
|
if (ControlFile->data_checksum_version == 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("%s: data checksums are not enabled in cluster.\n"), progname);
|
fprintf(stderr, _("%s: data checksums are not enabled in cluster.\n"), progname);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user