8000 Rename pg_verify_checksums to pg_checksums · postgrespro/postgres@6dd263c · GitHub
[go: up one dir, main page]

Skip to content

Commit 6dd263c

Browse files
committed
Rename pg_verify_checksums to pg_checksums
The current tool name is too restrictive and focuses only on verifying checksums. As more options to control checksums for an offline cluster are planned to be added, switch to a more generic name. Documentation as well as all past references to the tool are updated. Author: Michael Paquier Reviewed-by: Michael Banck, Fabien Coelho, Seigei Kornilov Discussion: https://postgr.es/m/20181221201616.GD4974@nighthawk.caipicrew.dd-dns.de
1 parent c9ae7f7 commit 6dd263c

File tree

15 files changed

+66
-62
lines changed

15 files changed

+66
-62
lines changed

doc/src/sgml/ref/allfiles.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ Complete list of usable sgml source files in this directory.
199199
<!ENTITY pgarchivecleanup SYSTEM "pgarchivecleanup.sgml">
200200
<!ENTITY pgBasebackup SYSTEM "pg_basebackup.sgml">
201201
<!ENTITY pgbench SYSTEM "pgbench.sgml">
202+
<!ENTITY pgChecksums SYSTEM "pg_checksums.sgml">
202203
<!ENTITY pgConfig SYSTEM "pg_config-ref.sgml">
203204
<!ENTITY pgControldata SYSTEM "pg_controldata.sgml">
204205
<!ENTITY pgCtl SYSTEM "pg_ctl-ref.sgml">
@@ -210,7 +211,6 @@ Complete list of usable sgml source files in this directory.
210211
<!ENTITY pgResetwal SYSTEM "pg_resetwal.sgml">
211212
<!ENTITY pgRestore SYSTEM "pg_restore.sgml">
212213
<!ENTITY pgRewind SYSTEM "pg_rewind.sgml">
213-
<!ENTITY pgVerifyChecksums SYSTEM "pg_verify_checksums.sgml">
214214
<!ENTITY pgtestfsync SYSTEM "pgtestfsync.sgml">
215215
<!ENTITY pgtesttiming SYSTEM "pgtesttiming.sgml">
216216
<!ENTITY pgupgrade SYSTEM "pgupgrade.sgml">

doc/src/sgml/ref/pg_verify_checksums.sgml renamed to doc/src/sgml/ref/pg_checksums.sgml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
<!--
2-
doc/src/sgml/ref/pg_verify_checksums.sgml
2+
doc/src/sgml/ref/pg_checksums.sgml
33
PostgreSQL documentation
44
-->
55

6-
<refentry id="pgverifychecksums">
7-
<indexterm zone="pgverifychecksums">
8-
<primary>pg_verify_checksums</primary>
6+
<refentry id="app-pgchecksums">
7+
<indexterm zone="app-pgchecksums">
8+
<primary>pg_checksums</primary>
99
</indexterm>
1010

1111
<refmeta>
12-
<refentrytitle><application>pg_verify_checksums</application></refentrytitle>
12+
<refentrytitle><application>pg_checksums</application></refentrytitle>
1313
<manvolnum>1</manvolnum>
1414
<refmiscinfo>Application</refmiscinfo>
1515
</refmeta>
1616

1717
<refnamediv>
18-
<refname>pg_verify_checksums</refname>
18+
<refname>pg_checksums</refname>
1919
<refpurpose>verify data checksums in a <productname>PostgreSQL</productname> database cluster</refpurpose>
2020
</refnamediv>
2121

2222
<refsynopsisdiv>
2323
<cmdsynopsis>
24-
<command>pg_verify_checksums</command>
24+
<command>pg_checksums</command>
2525
<arg rep="repeat" choice="opt"><replaceable class="parameter">option</replaceable></arg>
2626
<group choice="opt">
2727
<group choice="opt">
@@ -33,12 +33,12 @@ PostgreSQL documentation
3333
</cmdsynopsis>
3434
</refsynopsisdiv>
3535

36-
<refsect1 id="r1-app-pg_verify_checksums-1">
36+
<refsect1 id="r1-app-pg_checksums-1">
3737
<title>Description</title>
3838
<para>
39-
<command>pg_verify_checksums</command> verifies data checksums in a
39+
<application>pg_checksums</application> verifies data checksums in a
4040
<productname>PostgreSQL</productname> cluster. The server must be shut
41-
down cleanly before running <application>pg_verify_checksums</application>.
41+
down cleanly before running <application>pg_checksums</application>.
4242
The exit status is zero if there are no checksum errors, otherwise nonzero.
4343
</para>
4444
</refsect1>
@@ -84,7 +84,7 @@ PostgreSQL documentation
8484
<term><option>--version</option></term>
8585
<listitem>
8686
<para>
87-
Print the <application>pg_verify_checksums</application> version and exit.
87+
Print the <application>pg_checksums</application> version and exit.
8888
</para>
8989
</listitem>
9090
</varlistentry>
@@ -94,7 +94,7 @@ PostgreSQL documentation
9494
<term><option>--help</option></term>
9595
<listitem>
9696
<para>
97-
Show help about <application>pg_verify_checksums</application> command line
97+
Show help about <application>pg_checksums</application> command line
9898
arguments, and exit.
9999
</para>
100100
</listitem>

doc/src/sgml/reference.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,14 @@
276276

277277
&initdb;
278278
&pgarchivecleanup;
279+
&pgChecksums;
279280
&pgControldata;
280281
&pgCtl;
281282
&pgResetwal;
282283
&pgRewind;
283284
&pgtestfsync;
284285
&pgtesttiming;
285286
&pgupgrade;
286-
&pgVerifyChecksums;
287287
&pgwaldump;
288288
&postgres;
289289
&postmaster;

src/backend/replication/basebackup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static const char *excludeFiles[] =
190190
/*
191191
* List of files excluded from checksum validation.
192192
*
193-
* Note: this list should be kept in sync with what pg_verify_checksums.c
193+
* Note: this list should be kept in sync with what pg_checksums.c
194194
* includes.
195195
*/
196196
static const char *const noChecksumFiles[] = {

src/bin/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ SUBDIRS = \
1717
initdb \
1818
pg_archivecleanup \
1919
pg_basebackup \
20+
pg_checksums \
2021
pg_config \
2122
pg_controldata \
2223
pg_ctl \
@@ -26,7 +27,6 @@ SUBDIRS = \
2627
pg_test_fsync \
2728
pg_test_timing \
2829
pg_upgrade \
29-
pg_verify_checksums \
3030
pg_waldump \
3131
pgbench \
3232
psql \

src/bin/initdb/t/001_initdb.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@
6363
command_like(['pg_controldata', $datadir],
6464
qr/Data page checksum version:.*0/,
6565
'checksums are disabled in control file');
66-
# pg_verify_checksums fails with checksums disabled by default. This is
67-
# not part of the tests included in pg_verify_checksums to save from
66+
# pg_checksums fails with checksums disabled by default. This is
67+
# not part of the tests included in pg_checksums to save from
6868
# the creation of an extra instance.
6969
command_fails(
70-
[ 'pg_verify_checksums', '-D', $datadir],
71-
"pg_verify_checksums fails with data checksum disabled");
70+
[ 'pg_checksums', '-D', $datadir],
71+
"pg_checksums fails with data checksum disabled");
7272

7373
command_ok([ 'initdb', '-S', $datadir ], 'sync only');
7474
command_fails([ 'initdb', $datadir ], 'existing data directory');

src/bin/pg_checksums/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/pg_checksums
2+
3+
/tmp_check/

src/bin/pg_verify_checksums/Makefile renamed to src/bin/pg_checksums/Makefile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
#-------------------------------------------------------------------------
22
#
3-
# Makefile for src/bin/pg_verify_checksums
3+
# Makefile for src/bin/pg_checksums
44
#
55
# Copyright (c) 1998-2019, PostgreSQL Global Development Group
66
#
7-
# src/bin/pg_verify_checksums/Makefile
7+
# src/bin/pg_checksums/Makefile
88
#
99
#-------------------------------------------------------------------------
1010

11-
PGFILEDESC = "pg_verify_checksums - verify data checksums in an offline cluster"
11+
PGFILEDESC = "pg_checksums - verify data checksums in an offline cluster"
1212
PGAPPICON=win32
1313

14-
subdir = src/bin/pg_verify_checksums
14+
subdir = src/bin/pg_checksums
1515
top_builddir = ../../..
1616
include $(top_builddir)/src/Makefile.global
1717

18-
OBJS= pg_verify_checksums.o $(WIN32RES)
18+
OBJS= pg_checksums.o $(WIN32RES)
1919

20-
all: pg_verify_checksums
20+
all: pg_checksums
2121

22-
pg_verify_checksums: $(OBJS) | submake-libpgport
22+
pg_checksums: $(OBJS) | submake-libpgport
2323
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
2424

2525
install: all installdirs
26-
$(INSTALL_PROGRAM) pg_verify_checksums$(X) '$(DESTDIR)$(bindir)/pg_verify_checksums$(X)'
26+
$(INSTALL_PROGRAM) pg_checksums$(X) '$(DESTDIR)$(bindir)/pg_checksums$(X)'
2727

2828
installdirs:
2929
$(MKDIR_P) '$(DESTDIR)$(bindir)'
3030

3131
uninstall:
32-
rm -f '$(DESTDIR)$(bindir)/pg_verify_checksums$(X)'
32+
rm -f '$(DESTDIR)$(bindir)/pg_checksums$(X)'
3333

3434
clean distclean maintainer-clean:
35-
rm -f pg_verify_checksums$(X) $(OBJS)
35+
rm -f pg_checksums$(X) $(OBJS)
3636
rm -rf tmp_check
3737

3838
check:

src/bin/pg_checksums/nls.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# src/bin/pg_checksums/nls.mk
2+
CATALOG_NAME = pg_checksums
3+
AVAIL_LANGUAGES =
4+
GETTEXT_FILES = pg_checksums.c

src/bin/pg_verify_checksums/pg_verify_checksums.c renamed to src/bin/pg_checksums/pg_checksums.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
/*
2-
* pg_verify_checksums
1+
/*-------------------------------------------------------------------------
2+
*
3+
* pg_checksums.c
4+
* Verifies page level checksums in an offline cluster.
35
*
4-
* Verifies page level checksums in an offline cluster
6+
* Copyright (c) 2010-2019, PostgreSQL Global Development Group
57
*
6-
* Copyright (c) 2010-2019, PostgreSQL Global Development Group
8+
* IDENTIFICATION
9+
* src/bin/pg_checksums/pg_checksums.c
710
*
8-
* src/bin/pg_verify_checksums/pg_verify_checksums.c
11+
*-------------------------------------------------------------------------
912
*/
13+
1014
#include "postgres_fe.h"
1115

1216
#include <dirent.h>
@@ -240,7 +244,7 @@ main(int argc, char *argv[])
240244
int option_index;
241245
bool crc_ok;
242246

243-
set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_verify_checksums"));
247+
set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_checksums"));
244248

245249
progname = get_progname(argv[0]);
246250

@@ -253,7 +257,7 @@ main(int argc, char *argv[])
253257
}
254258
if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
255259
{
256-
puts("pg_verify_checksums (PostgreSQL) " PG_VERSION);
260+
puts("pg_checksums (PostgreSQL) " PG_VERSION);
257261
exit(0);
258262
}
259263
}
@@ -318,7 +322,7 @@ main(int argc, char *argv[])
318322

319323
if (ControlFile->pg_control_version != PG_CONTROL_VERSION)
320324
{
321-
fprintf(stderr, _("%s: cluster is not compatible with this version of pg_verify_checksums\n"),
325+
fprintf(stderr, _("%s: cluster is not compatible with this version of pg_checksums\n"),
322326
progname);
323327
exit(1);
324328
}

0 commit comments

Comments
 (0)
0