Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 44e2df4

Browse files
committed
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
1 parent 49ac403 commit 44e2df4

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

doc/src/sgml/ref/pg_verify_checksums.sgml

-9
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,6 @@ PostgreSQL documentation
5252
</listitem>
5353
</varlistentry>
5454

55-
<varlistentry>
56-
<term><option>-f</option></term>
57-
<listitem>
58-
<para>
59-
Force check even if checksums are disabled on cluster.
60-
</para>
61-
</listitem>
62-
</varlistentry>
63-
6455
<varlistentry>
6556
<term><option>-d</option></term>
6657
<listitem>

src/bin/pg_verify_checksums/pg_verify_checksums.c

+2-7
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ usage()
4242
printf(_(" %s [OPTION] [DATADIR]\n"), progname);
4343
printf(_("\nOptions:\n"));
4444
printf(_(" [-D] DATADIR data directory\n"));
45-
printf(_(" -f, force check even if checksums are disabled\n"));
4645
printf(_(" -r relfilenode check only relation with specified relfilenode\n"));
4746
printf(_(" -d debug output, listing all checked blocks\n"));
4847
printf(_(" -V, --version output version information, then exit\n"));
@@ -202,7 +201,6 @@ int
202201
main(int argc, char *argv[])
203202
{
204203
char *DataDir = NULL;
205-
bool force = false;
206204
int c;
207205
bool crc_ok;
208206

@@ -224,7 +222,7 @@ main(int argc, char *argv[])
224222
}
225223
}
226224

227-
while ((c = getopt(argc, argv, "D:fr:d")) != -1)
225+
while ((c = getopt(argc, argv, "D:r:d")) != -1)
228226
{
229227
switch (c)
230228
{
@@ -234,9 +232,6 @@ main(int argc, char *argv[])
234232
case 'D':
235233
DataDir = optarg;
236234
break;
237-
case 'f':
238-
force = true;
239-
break;
240235
case 'r':
241236
if (atoi(optarg) <= 0)
242237
{
@@ -292,7 +287,7 @@ main(int argc, char *argv[])
292287
exit(1);
293288
}
294289

295-
if (ControlFile->data_checksum_version == 0 && !force)
290+
if (ControlFile->data_checksum_version == 0)
296291
{
297292
fprintf(stderr, _("%s: data checksums are not enabled in cluster.\n"), progname);
298293
exit(1);

0 commit comments

Comments
 (0)