summaryrefslogtreecommitdiffstats
path: root/src/bin/pg_checksums
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_checksums')
-rw-r--r--src/bin/pg_checksums/.gitignore3
-rw-r--r--src/bin/pg_checksums/Makefile44
-rw-r--r--src/bin/pg_checksums/nls.mk6
-rw-r--r--src/bin/pg_checksums/pg_checksums.c680
-rw-r--r--src/bin/pg_checksums/po/cs.po312
-rw-r--r--src/bin/pg_checksums/po/de.po310
-rw-r--r--src/bin/pg_checksums/po/el.po311
-rw-r--r--src/bin/pg_checksums/po/es.po312
-rw-r--r--src/bin/pg_checksums/po/fr.po338
-rw-r--r--src/bin/pg_checksums/po/ja.po307
-rw-r--r--src/bin/pg_checksums/po/ko.po323
-rw-r--r--src/bin/pg_checksums/po/ru.po326
-rw-r--r--src/bin/pg_checksums/po/sv.po309
-rw-r--r--src/bin/pg_checksums/po/tr.po304
-rw-r--r--src/bin/pg_checksums/po/uk.po299
-rw-r--r--src/bin/pg_checksums/po/zh_CN.po307
-rw-r--r--src/bin/pg_checksums/t/001_basic.pl11
-rw-r--r--src/bin/pg_checksums/t/002_actions.pl235
18 files changed, 4737 insertions, 0 deletions
diff --git a/src/bin/pg_checksums/.gitignore b/src/bin/pg_checksums/.gitignore
new file mode 100644
index 0000000..7888625
--- /dev/null
+++ b/src/bin/pg_checksums/.gitignore
@@ -0,0 +1,3 @@
+/pg_checksums
+
+/tmp_check/
diff --git a/src/bin/pg_checksums/Makefile b/src/bin/pg_checksums/Makefile
new file mode 100644
index 0000000..ba62406
--- /dev/null
+++ b/src/bin/pg_checksums/Makefile
@@ -0,0 +1,44 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for src/bin/pg_checksums
+#
+# Copyright (c) 1998-2021, PostgreSQL Global Development Group
+#
+# src/bin/pg_checksums/Makefile
+#
+#-------------------------------------------------------------------------
+
+PGFILEDESC = "pg_checksums - verify data checksums in an offline cluster"
+PGAPPICON=win32
+
+subdir = src/bin/pg_checksums
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
+
+OBJS = \
+ $(WIN32RES) \
+ pg_checksums.o
+
+all: pg_checksums
+
+pg_checksums: $(OBJS) | submake-libpgport
+ $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+
+install: all installdirs
+ $(INSTALL_PROGRAM) pg_checksums$(X) '$(DESTDIR)$(bindir)/pg_checksums$(X)'
+
+installdirs:
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
+
+uninstall:
+ rm -f '$(DESTDIR)$(bindir)/pg_checksums$(X)'
+
+clean distclean maintainer-clean:
+ rm -f pg_checksums$(X) $(OBJS)
+ rm -rf tmp_check
+
+check:
+ $(prove_check)
+
+installcheck:
+ $(prove_installcheck)
diff --git a/src/bin/pg_checksums/nls.mk b/src/bin/pg_checksums/nls.mk
new file mode 100644
index 0000000..a7a9423
--- /dev/null
+++ b/src/bin/pg_checksums/nls.mk
@@ -0,0 +1,6 @@
+# src/bin/pg_checksums/nls.mk
+CATALOG_NAME = pg_checksums
+AVAIL_LANGUAGES = cs de el es fr ja ko ru sv tr uk zh_CN
+GETTEXT_FILES = $(FRONTEND_COMMON_GETTEXT_FILES) pg_checksums.c
+GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS)
+GETTEXT_FLAGS = $(FRONTEND_COMMON_GETTEXT_FLAGS)
diff --git a/src/bin/pg_checksums/pg_checksums.c b/src/bin/pg_checksums/pg_checksums.c
new file mode 100644
index 0000000..831cf42
--- /dev/null
+++ b/src/bin/pg_checksums/pg_checksums.c
@@ -0,0 +1,680 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_checksums.c
+ * Checks, enables or disables page level checksums for an offline
+ * cluster
+ *
+ * Copyright (c) 2010-2021, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/bin/pg_checksums/pg_checksums.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <dirent.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "access/xlog_internal.h"
+#include "common/controldata_utils.h"
+#include "common/file_perm.h"
+#include "common/file_utils.h"
+#include "common/logging.h"
+#include "getopt_long.h"
+#include "pg_getopt.h"
+#include "storage/bufpage.h"
+#include "storage/checksum.h"
+#include "storage/checksum_impl.h"
+
+
+static int64 files = 0;
+static int64 blocks = 0;
+static int64 badblocks = 0;
+static ControlFileData *ControlFile;
+
+static char *only_filenode = NULL;
+static bool do_sync = true;
+static bool verbose = false;
+static bool showprogress = false;
+
+typedef enum
+{
+ PG_MODE_CHECK,
+ PG_MODE_DISABLE,
+ PG_MODE_ENABLE
+} PgChecksumMode;
+
+/*
+ * Filename components.
+ *
+ * XXX: fd.h is not declared here as frontend side code is not able to
+ * interact with the backend-side definitions for the various fsync
+ * wrappers.
+ */
+#define PG_TEMP_FILES_DIR "pgsql_tmp"
+#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
+
+static PgChecksumMode mode = PG_MODE_CHECK;
+
+static const char *progname;
+
+/*
+ * Progress status information.
+ */
+int64 total_size = 0;
+int64 current_size = 0;
+static pg_time_t last_progress_report = 0;
+
+static void
+usage(void)
+{
+ printf(_("%s enables, disables, or verifies data checksums in a PostgreSQL database cluster.\n\n"), progname);
+ printf(_("Usage:\n"));
+ printf(_(" %s [OPTION]... [DATADIR]\n"), progname);
+ printf(_("\nOptions:\n"));
+ printf(_(" [-D, --pgdata=]DATADIR data directory\n"));
+ printf(_(" -c, --check check data checksums (default)\n"));
+ printf(_(" -d, --disable disable data checksums\n"));
+ printf(_(" -e, --enable enable data checksums\n"));
+ printf(_(" -f, --filenode=FILENODE check only relation with specified filenode\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(_(" -v, --verbose output verbose messages\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
+ printf(_("\nIf no data directory (DATADIR) is specified, "
+ "the environment variable PGDATA\nis used.\n\n"));
+ printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT);
+ printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
+}
+
+/*
+ * Definition of one element part of an exclusion list, used for files
+ * to exclude from checksum validation. "name" is the name of the file
+ * or path to check for exclusion. If "match_prefix" is true, any items
+ * matching the name as prefix are excluded.
+ */
+struct exclude_list_item
+{
+ const char *name;
+ bool match_prefix;
+};
+
+/*
+ * List of files excluded from checksum validation.
+ *
+ * Note: this list should be kept in sync with what basebackup.c includes.
+ */
+static const struct exclude_list_item skip[] = {
+ {"pg_control", false},
+ {"pg_filenode.map", false},
+ {"pg_internal.init", true},
+ {"PG_VERSION", false},
+#ifdef EXEC_BACKEND
+ {"config_exec_params", true},
+#endif
+ {NULL, false}
+};
+
+/*
+ * Report current progress status. Parts borrowed from
+ * src/bin/pg_basebackup/pg_basebackup.c.
+ */
+static void
+progress_report(bool finished)
+{
+ int percent;
+ char total_size_str[32];
+ char current_size_str[32];
+ pg_time_t now;
+
+ Assert(showprogress);
+
+ now = time(NULL);
+ if (now == last_progress_report && !finished)
+ return; /* Max once per second */
+
+ /* Save current time */
+ last_progress_report = now;
+
+ /* Adjust total size if current_size is larger */
+ if (current_size > total_size)
+ total_size = current_size;
+
+ /* Calculate current percentage of size done */
+ percent = total_size ? (int) ((current_size) * 100 / total_size) : 0;
+
+ /*
+ * Separate step to keep platform-dependent format code out of
+ * translatable strings. And we only test for INT64_FORMAT availability
+ * in snprintf, not fprintf.
+ */
+ snprintf(total_size_str, sizeof(total_size_str), INT64_FORMAT,
+ total_size / (1024 * 1024));
+ snprintf(current_size_str, sizeof(current_size_str), INT64_FORMAT,
+ current_size / (1024 * 1024));
+
+ fprintf(stderr, _("%*s/%s MB (%d%%) computed"),
+ (int) strlen(current_size_str), current_size_str, total_size_str,
+ percent);
+
+ /*
+ * Stay on the same line if reporting to a terminal and we're not done
+ * yet.
+ */
+ fputc((!finished && isatty(fileno(stderr))) ? '\r' : '\n', stderr);
+}
+
+static bool
+skipfile(const char *fn)
+{
+ int excludeIdx;
+
+ for (excludeIdx = 0; skip[excludeIdx].name != NULL; excludeIdx++)
+ {
+ int cmplen = strlen(skip[excludeIdx].name);
+
+ if (!skip[excludeIdx].match_prefix)
+ cmplen++;
+ if (strncmp(skip[excludeIdx].name, fn, cmplen) == 0)
+ return true;
+ }
+
+ return false;
+}
+
+static void
+scan_file(const char *fn, BlockNumber segmentno)
+{
+ PGAlignedBlock buf;
+ PageHeader header = (PageHeader) buf.data;
+ int f;
+ BlockNumber blockno;
+ int flags;
+
+ Assert(mode == PG_MODE_ENABLE ||
+ mode == PG_MODE_CHECK);
+
+ flags = (mode == PG_MODE_ENABLE) ? O_RDWR : O_RDONLY;
+ f = open(fn, PG_BINARY | flags, 0);
+
+ if (f < 0)
+ {
+ pg_log_error("could not open file \"%s\": %m", fn);
+ exit(1);
+ }
+
+ files++;
+
+ for (blockno = 0;; blockno++)
+ {
+ uint16 csum;
+ int r = read(f, buf.data, BLCKSZ);
+
+ if (r == 0)
+ break;
+ if (r != BLCKSZ)
+ {
+ if (r < 0)
+ pg_log_error("could not read block %u in file \"%s\": %m",
+ blockno, fn);
+ else
+ pg_log_error("could not read block %u in file \"%s\": read %d of %d",
+ blockno, fn, r, BLCKSZ);
+ exit(1);
+ }
+ blocks++;
+
+ /*
+ * Since the file size is counted as total_size for progress status
+ * information, the sizes of all pages including new ones in the file
+ * should be counted as current_size. Otherwise the progress reporting
+ * calculated using those counters may not reach 100%.
+ */
+ current_size += r;
+
+ /* New pages have no checksum yet */
+ if (PageIsNew(header))
+ continue;
+
+ csum = pg_checksum_page(buf.data, blockno + segmentno * RELSEG_SIZE);
+ if (mode == PG_MODE_CHECK)
+ {
+ if (csum != header->pd_checksum)
+ {
+ if (ControlFile->data_checksum_version == PG_DATA_CHECKSUM_VERSION)
+ pg_log_error("checksum verification failed in file \"%s\", block %u: calculated checksum %X but block contains %X",
+ fn, blockno, csum, header->pd_checksum);
+ badblocks++;
+ }
+ }
+ else if (mode == PG_MODE_ENABLE)
+ {
+ int w;
+
+ /* Set checksum in page header */
+ header->pd_checksum = csum;
+
+ /* Seek back to beginning of block */
+ if (lseek(f, -BLCKSZ, SEEK_CUR) < 0)
+ {
+ pg_log_error("seek failed for block %u in file \"%s\": %m", blockno, fn);
+ exit(1);
+ }
+
+ /* Write block with checksum */
+ w = write(f, buf.data, BLCKSZ);
+ if (w != BLCKSZ)
+ {
+ if (w < 0)
+ pg_log_error("could not write block %u in file \"%s\": %m",
+ blockno, fn);
+ else
+ pg_log_error("could not write block %u in file \"%s\": wrote %d of %d",
+ blockno, fn, w, BLCKSZ);
+ exit(1);
+ }
+ }
+
+ if (showprogress)
+ progress_report(false);
+ }
+
+ if (verbose)
+ {
+ if (mode == PG_MODE_CHECK)
+ pg_log_info("checksums verified in file \"%s\"", fn);
+ if (mode == PG_MODE_ENABLE)
+ pg_log_info("checksums enabled in file \"%s\"", fn);
+ }
+
+ close(f);
+}
+
+/*
+ * Scan the given directory for items which can be checksummed and
+ * operate on each one of them. If "sizeonly" is true, the size of
+ * all the items which have checksums is computed and returned back
+ * to the caller without operating on the files. This is used to compile
+ * the total size of the data directory for progress reports.
+ */
+static int64
+scan_directory(const char *basedir, const char *subdir, bool sizeonly)
+{
+ int64 dirsize = 0;
+ char path[MAXPGPATH];
+ DIR *dir;
+ struct dirent *de;
+
+ snprintf(path, sizeof(path), "%s/%s", basedir, subdir);
+ dir = opendir(path);
+ if (!dir)
+ {
+ pg_log_error("could not open directory \"%s\": %m", path);
+ exit(1);
+ }
+ while ((de = readdir(dir)) != NULL)
+ {
+ char fn[MAXPGPATH];
+ struct stat st;
+
+ if (strcmp(de->d_name, ".") == 0 ||
+ strcmp(de->d_name, "..") == 0)
+ continue;
+
+ /* Skip temporary files */
+ if (strncmp(de->d_name,
+ PG_TEMP_FILE_PREFIX,
+ strlen(PG_TEMP_FILE_PREFIX)) == 0)
+ continue;
+
+ /* Skip temporary folders */
+ if (strncmp(de->d_name,
+ PG_TEMP_FILES_DIR,
+ strlen(PG_TEMP_FILES_DIR)) == 0)
+ continue;
+
+ snprintf(fn, sizeof(fn), "%s/%s", path, de->d_name);
+ if (lstat(fn, &st) < 0)
+ {
+ pg_log_error("could not stat file \"%s\": %m", fn);
+ exit(1);
+ }
+ if (S_ISREG(st.st_mode))
+ {
+ char fnonly[MAXPGPATH];
+ char *forkpath,
+ *segmentpath;
+ BlockNumber segmentno = 0;
+
+ if (skipfile(de->d_name))
+ continue;
+
+ /*
+ * Cut off at the segment boundary (".") to get the segment number
+ * in order to mix it into the checksum. Then also cut off at the
+ * fork boundary, to get the filenode the file belongs to for
+ * filtering.
+ */
+ strlcpy(fnonly, de->d_name, sizeof(fnonly));
+ segmentpath = strchr(fnonly, '.');
+ if (segmentpath != NULL)
+ {
+ *segmentpath++ = '\0';
+ segmentno = atoi(segmentpath);
+ if (segmentno == 0)
+ {
+ pg_log_error("invalid segment number %d in file name \"%s\"",
+ segmentno, fn);
+ exit(1);
+ }
+ }
+
+ forkpath = strchr(fnonly, '_');
+ if (forkpath != NULL)
+ *forkpath++ = '\0';
+
+ if (only_filenode && strcmp(only_filenode, fnonly) != 0)
+ /* filenode not to be included */
+ continue;
+
+ dirsize += st.st_size;
+
+ /*
+ * No need to work on the file when calculating only the size of
+ * the items in the data folder.
+ */
+ if (!sizeonly)
+ scan_file(fn, segmentno);
+ }
+#ifndef WIN32
+ else if (S_ISDIR(st.st_mode) || S_ISLNK(st.st_mode))
+#else
+ else if (S_ISDIR(st.st_mode) || pgwin32_is_junction(fn))
+#endif
+ {
+ /*
+ * If going through the entries of pg_tblspc, we assume to operate
+ * on tablespace locations where only TABLESPACE_VERSION_DIRECTORY
+ * is valid, resolving the linked locations and dive into them
+ * directly.
+ */
+ if (strncmp("pg_tblspc", subdir, strlen("pg_tblspc")) == 0)
+ {
+ char tblspc_path[MAXPGPATH];
+ struct stat tblspc_st;
+
+ /*
+ * Resolve tablespace location path and check whether
+ * TABLESPACE_VERSION_DIRECTORY exists. Not finding a valid
+ * location is unexpected, since there should be no orphaned
+ * links and no links pointing to something else than a
+ * directory.
+ */
+ snprintf(tblspc_path, sizeof(tblspc_path), "%s/%s/%s",
+ path, de->d_name, TABLESPACE_VERSION_DIRECTORY);
+
+ if (lstat(tblspc_path, &tblspc_st) < 0)
+ {
+ pg_log_error("could not stat file \"%s\": %m",
+ tblspc_path);
+ exit(1);
+ }
+
+ /*
+ * Move backwards once as the scan needs to happen for the
+ * contents of TABLESPACE_VERSION_DIRECTORY.
+ */
+ snprintf(tblspc_path, sizeof(tblspc_path), "%s/%s",
+ path, de->d_name);
+
+ /* Looks like a valid tablespace location */
+ dirsize += scan_directory(tblspc_path,
+ TABLESPACE_VERSION_DIRECTORY,
+ sizeonly);
+ }
+ else
+ {
+ dirsize += scan_directory(path, de->d_name, sizeonly);
+ }
+ }
+ }
+ closedir(dir);
+ return dirsize;
+}
+
+int
+main(int argc, char *argv[])
+{
+ static struct option long_options[] = {
+ {"check", no_argument, NULL, 'c'},
+ {"pgdata", required_argument, NULL, 'D'},
+ {"disable", no_argument, NULL, 'd'},
+ {"enable", no_argument, NULL, 'e'},
+ {"filenode", required_argument, NULL, 'f'},
+ {"no-sync", no_argument, NULL, 'N'},
+ {"progress", no_argument, NULL, 'P'},
+ {"verbose", no_argument, NULL, 'v'},
+ {NULL, 0, NULL, 0}
+ };
+
+ char *DataDir = NULL;
+ int c;
+ int option_index;
+ bool crc_ok;
+
+ pg_logging_init(argv[0]);
+ set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_checksums"));
+ progname = get_progname(argv[0]);
+
+ if (argc > 1)
+ {
+ if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
+ {
+ usage();
+ exit(0);
+ }
+ if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
+ {
+ puts("pg_checksums (PostgreSQL) " PG_VERSION);
+ exit(0);
+ }
+ }
+
+ while ((c = getopt_long(argc, argv, "cD:deNPf:v", long_options, &option_index)) != -1)
+ {
+ switch (c)
+ {
+ case 'c':
+ mode = PG_MODE_CHECK;
+ break;
+ case 'd':
+ mode = PG_MODE_DISABLE;
+ break;
+ case 'e':
+ mode = PG_MODE_ENABLE;
+ break;
+ case 'f':
+ if (atoi(optarg) == 0)
+ {
+ pg_log_error("invalid filenode specification, must be numeric: %s", optarg);
+ exit(1);
+ }
+ only_filenode = pstrdup(optarg);
+ break;
+ case 'N':
+ do_sync = false;
+ break;
+ case 'v':
+ verbose = true;
+ break;
+ case 'D':
+ DataDir = optarg;
+ break;
+ case 'P':
+ showprogress = true;
+ break;
+ default:
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+ exit(1);
+ }
+ }
+
+ if (DataDir == NULL)
+ {
+ if (optind < argc)
+ DataDir = argv[optind++];
+ else
+ DataDir = getenv("PGDATA");
+
+ /* If no DataDir was specified, and none could be found, error out */
+ if (DataDir == NULL)
+ {
+ pg_log_error("no data directory specified");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+ exit(1);
+ }
+ }
+
+ /* Complain if any arguments remain */
+ if (optind < argc)
+ {
+ pg_log_error("too many command-line arguments (first is \"%s\")",
+ argv[optind]);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ /* filenode checking only works in --check mode */
+ if (mode != PG_MODE_CHECK && only_filenode)
+ {
+ pg_log_error("option -f/--filenode can only be used with --check");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ /* Read the control file and check compatibility */
+ ControlFile = get_controlfile(DataDir, &crc_ok);
+ if (!crc_ok)
+ {
+ pg_log_error("pg_control CRC value is incorrect");
+ exit(1);
+ }
+
+ if (ControlFile->pg_control_version != PG_CONTROL_VERSION)
+ {
+ pg_log_error("cluster is not compatible with this version of pg_checksums");
+ exit(1);
+ }
+
+ if (ControlFile->blcksz != BLCKSZ)
+ {
+ pg_log_error("database cluster is not compatible");
+ fprintf(stderr, _("The database cluster was initialized with block size %u, but pg_checksums was compiled with block size %u.\n"),
+ ControlFile->blcksz, BLCKSZ);
+ exit(1);
+ }
+
+ /*
+ * Check if cluster is running. A clean shutdown is required to avoid
+ * random checksum failures caused by torn pages. Note that this doesn't
+ * guard against someone starting the cluster concurrently.
+ */
+ if (ControlFile->state != DB_SHUTDOWNED &&
+ ControlFile->state != DB_SHUTDOWNED_IN_RECOVERY)
+ {
+ pg_log_error("cluster must be shut down");
+ exit(1);
+ }
+
+ if (ControlFile->data_checksum_version == 0 &&
+ mode == PG_MODE_CHECK)
+ {
+ pg_log_error("data checksums are not enabled in cluster");
+ exit(1);
+ }
+
+ if (ControlFile->data_checksum_version == 0 &&
+ mode == PG_MODE_DISABLE)
+ {
+ pg_log_error("data checksums are already disabled in cluster");
+ exit(1);
+ }
+
+ if (ControlFile->data_checksum_version > 0 &&
+ mode == PG_MODE_ENABLE)
+ {
+ pg_log_error("data checksums are already enabled in cluster");
+ exit(1);
+ }
+
+ /* Operate on all files if checking or enabling checksums */
+ if (mode == PG_MODE_CHECK || mode == PG_MODE_ENABLE)
+ {
+ /*
+ * If progress status information is requested, we need to scan the
+ * directory tree twice: once to know how much total data needs to be
+ * processed and once to do the real work.
+ */
+ if (showprogress)
+ {
+ total_size = scan_directory(DataDir, "global", true);
+ total_size += scan_directory(DataDir, "base", true);
+ total_size += scan_directory(DataDir, "pg_tblspc", true);
+ }
+
+ (void) scan_directory(DataDir, "global", false);
+ (void) scan_directory(DataDir, "base", false);
+ (void) scan_directory(DataDir, "pg_tblspc", false);
+
+ if (showprogress)
+ progress_report(true);
+
+ printf(_("Checksum operation completed\n"));
+ printf(_("Files scanned: %s\n"), psprintf(INT64_FORMAT, files));
+ printf(_("Blocks scanned: %s\n"), psprintf(INT64_FORMAT, blocks));
+ if (mode == PG_MODE_CHECK)
+ {
+ printf(_("Bad checksums: %s\n"), psprintf(INT64_FORMAT, badblocks));
+ printf(_("Data checksum version: %u\n"), ControlFile->data_checksum_version);
+
+ if (badblocks > 0)
+ exit(1);
+ }
+ }
+
+ /*
+ * Finally make the data durable on disk if enabling or disabling
+ * checksums. Flush first the data directory for safety, and then update
+ * the control file to keep the switch consistent.
+ */
+ if (mode == PG_MODE_ENABLE || mode == PG_MODE_DISABLE)
+ {
+ ControlFile->data_checksum_version =
+ (mode == PG_MODE_ENABLE) ? PG_DATA_CHECKSUM_VERSION : 0;
+
+ if (do_sync)
+ {
+ pg_log_info("syncing data directory");
+ fsync_pgdata(DataDir, PG_VERSION_NUM);
+ }
+
+ pg_log_info("updating control file");
+ update_controlfile(DataDir, ControlFile, do_sync);
+
+ if (verbose)
+ printf(_("Data checksum version: %u\n"), ControlFile->data_checksum_version);
+ if (mode == PG_MODE_ENABLE)
+ printf(_("Checksums enabled in cluster\n"));
+ else
+ printf(_("Checksums disabled in cluster\n"));
+ }
+
+ return 0;
+}
diff --git a/src/bin/pg_checksums/po/cs.po b/src/bin/pg_checksums/po/cs.po
new file mode 100644
index 0000000..df56be8
--- /dev/null
+++ b/src/bin/pg_checksums/po/cs.po
@@ -0,0 +1,312 @@
+# LANGUAGE message translation file for pg_checksums
+# Copyright (C) 2019 PostgreSQL Global Development Group
+# This file is distributed under the same license as the pg_checksums (PostgreSQL) package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_checksums (PostgreSQL) 12\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-10-31 16:17+0000\n"
+"PO-Revision-Date: 2020-10-31 21:31+0100\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.4.1\n"
+
+#: ../../../src/common/logging.c:236
+#, c-format
+msgid "fatal: "
+msgstr "fatal: "
+
+#: ../../../src/common/logging.c:243
+#, c-format
+msgid "error: "
+msgstr "error: "
+
+#: ../../../src/common/logging.c:250
+#, c-format
+msgid "warning: "
+msgstr "warning: "
+
+#: pg_checksums.c:75
+#, c-format
+msgid ""
+"%s enables, disables, or verifies data checksums in a PostgreSQL database cluster.\n"
+"\n"
+msgstr ""
+"%s zapíná, vypíná, nebo ověřuje kontrolní součty v PostgreSQL databázovém clusteru.\n"
+"\n"
+
+#: pg_checksums.c:76
+#, c-format
+msgid "Usage:\n"
+msgstr "Použití:\n"
+
+#: pg_checksums.c:77
+#, c-format
+msgid " %s [OPTION]... [DATADIR]\n"
+msgstr " %s [PŘEPÍNAČ]... [DATAADR]\n"
+
+#: pg_checksums.c:78
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Přepínače:\n"
+
+#: pg_checksums.c:79
+#, c-format
+msgid " [-D, --pgdata=]DATADIR data directory\n"
+msgstr " [-D, --pgdata=]DATADIR datový adresář\n"
+
+#: pg_checksums.c:80
+#, c-format
+msgid " -c, --check check data checksums (default)\n"
+msgstr " -c, --check ověř kontrolní součty (implicitní)\n"
+
+#: pg_checksums.c:81
+#, c-format
+msgid " -d, --disable disable data checksums\n"
+msgstr " -d, --disable vypni kontrolní součty\n"
+
+#: pg_checksums.c:82
+#, c-format
+msgid " -e, --enable enable data checksums\n"
+msgstr " -e, --enable zapni kontrolní součty\n"
+
+#: pg_checksums.c:83
+#, c-format
+msgid " -f, --filenode=FILENODE check only relation with specified filenode\n"
+msgstr " -f, --filenode=FILENODE zkontroluj pouze relaci se zadaným filenode\n"
+
+#: pg_checksums.c:84
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync nečekej na bezpečné zapsání změn na disk\n"
+
+#: pg_checksums.c:85
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress zobrazuj informace o průběhu\n"
+
+#: pg_checksums.c:86
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose vypisuj podrobné informace\n"
+
+#: pg_checksums.c:87
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version zobraz informaci o verzi, poté skonči\n"
+
+#: pg_checksums.c:88
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help zobraz tuto nápovědu, poté skonči\n"
+
+#: pg_checksums.c:89
+#, c-format
+msgid ""
+"\n"
+"If no data directory (DATADIR) is specified, the environment variable PGDATA\n"
+"is used.\n"
+"\n"
+msgstr ""
+"\n"
+"Není-li specifikován datový adresář, je použita proměnná prostředí\n"
+"PGDATA.\n"
+"\n"
+
+#: pg_checksums.c:91
+#, c-format
+msgid "Report bugs to <%s>.\n"
+msgstr "Chyby hlašte na <%s>.\n"
+
+#: pg_checksums.c:92
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s domácí stránka: <%s>\n"
+
+#: pg_checksums.c:161
+#, c-format
+msgid "%*s/%s MB (%d%%) computed"
+msgstr "%*s/%s MB (%d%%) zpracováno"
+
+#: pg_checksums.c:207
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "nelze otevřít soubor \"%s\": %m"
+
+#: pg_checksums.c:223
+#, c-format
+msgid "could not read block %u in file \"%s\": %m"
+msgstr "nelze přečíst blok %u v souboru \"%s\": %m"
+
+#: pg_checksums.c:226
+#, c-format
+msgid "could not read block %u in file \"%s\": read %d of %d"
+msgstr "nelze přečíst blok %u v souboru \"%s\": načteno %d z %d"
+
+#: pg_checksums.c:243
+#, c-format
+msgid "checksum verification failed in file \"%s\", block %u: calculated checksum %X but block contains %X"
+msgstr "ověření kontrolnícou součtů selhalo v souboru \"%s\", blok %u: spočtený kontrolní součet %X ale klok obsahuje %X"
+
+#: pg_checksums.c:258
+#, c-format
+msgid "seek failed for block %u in file \"%s\": %m"
+msgstr "nastavení pozice (seek) selhalo pro blok %u v souboru \"%s\": %m"
+
+#: pg_checksums.c:267
+#, c-format
+msgid "could not write block %u in file \"%s\": %m"
+msgstr "nelze zapsat blok %u v souboru \"%s\": %m"
+
+#: pg_checksums.c:270
+#, c-format
+msgid "could not write block %u in file \"%s\": wrote %d of %d"
+msgstr "nelze zapsat blok %u v souboru \"%s\": zapsáno %d z %d"
+
+#: pg_checksums.c:283
+#, c-format
+msgid "checksums verified in file \"%s\""
+msgstr "kontrolní součty ověřeny v souboru \"%s\""
+
+#: pg_checksums.c:285
+#, c-format
+msgid "checksums enabled in file \"%s\""
+msgstr "kontrolní součty zapnuty v souboru \"%s\""
+
+#: pg_checksums.c:310
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "nelze otevřít adresář \"%s\": %m"
+
+#: pg_checksums.c:337 pg_checksums.c:416
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "nelze načíst informace o souboru \"%s\": %m"
+
+#: pg_checksums.c:364
+#, c-format
+msgid "invalid segment number %d in file name \"%s\""
+msgstr "chybné číslo segmentu %d ve jménu souboru \"%s\""
+
+#: pg_checksums.c:497
+#, c-format
+msgid "invalid filenode specification, must be numeric: %s"
+msgstr "chybně zadaný filenode, vyžadována číselná hodnota: %s"
+
+#: pg_checksums.c:515 pg_checksums.c:531 pg_checksums.c:541 pg_checksums.c:550
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Zkuste \"%s --help\" pro více informací.\n"
+
+#: pg_checksums.c:530
+#, c-format
+msgid "no data directory specified"
+msgstr "datový adresář nebyl zadán"
+
+#: pg_checksums.c:539
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "příliš mnoho parametrů na příkazové řádce (první je \"%s\")"
+
+#: pg_checksums.c:549
+#, c-format
+msgid "option -f/--filenode can only be used with --check"
+msgstr "volba -f/--filenode může být použita pouze s volbou --check"
+
+#: pg_checksums.c:559
+#, c-format
+msgid "pg_control CRC value is incorrect"
+msgstr "pg_control CRC hodnota je neplatná"
+
+#: pg_checksums.c:565
+#, c-format
+msgid "cluster is not compatible with this version of pg_checksums"
+msgstr "cluster není kompatibilní s touto verzí pg_checksums"
+
+#: pg_checksums.c:571
+#, c-format
+msgid "database cluster is not compatible"
+msgstr "databázový cluster není kompatibilní"
+
+#: pg_checksums.c:572
+#, c-format
+msgid "The database cluster was initialized with block size %u, but pg_checksums was compiled with block size %u.\n"
+msgstr "Databázový cluster byl inicializován s bloky velikosti %u, ale pg_checksums byl zkompilován pro velikost bloku %u.\n"
+
+#: pg_checksums.c:585
+#, c-format
+msgid "cluster must be shut down"
+msgstr "cluster musí být vypnutý"
+
+#: pg_checksums.c:592
+#, c-format
+msgid "data checksums are not enabled in cluster"
+msgstr "kontrolní součty nejsou v clusteru zapnuty"
+
+#: pg_checksums.c:599
+#, c-format
+msgid "data checksums are already disabled in cluster"
+msgstr "kontrolní součty jsou v clusteru již vypnuty"
+
+#: pg_checksums.c:606
+#, c-format
+msgid "data checksums are already enabled in cluster"
+msgstr "kontrolní součty jsou v clusteru již zapnuty"
+
+#: pg_checksums.c:632
+#, c-format
+msgid "Checksum operation completed\n"
+msgstr "Operace s kontrolními součty dokončena\n"
+
+#: pg_checksums.c:633
+#, c-format
+msgid "Files scanned: %s\n"
+msgstr "Souborů přečteno: %s\n"
+
+#: pg_checksums.c:634
+#, c-format
+msgid "Blocks scanned: %s\n"
+msgstr "Přečtené datové bloky: %s\n"
+
+#: pg_checksums.c:637
+#, c-format
+msgid "Bad checksums: %s\n"
+msgstr "Chybné kontrolní součty: %s\n"
+
+#: pg_checksums.c:638 pg_checksums.c:665
+#, c-format
+msgid "Data checksum version: %d\n"
+msgstr "Verze kontrolních součtů: %d\n"
+
+#: pg_checksums.c:657
+#, c-format
+msgid "syncing data directory"
+msgstr "provádím sync datového adresáře"
+
+#: pg_checksums.c:661
+#, c-format
+msgid "updating control file"
+msgstr "aktualizuji control coubor"
+
+#: pg_checksums.c:667
+#, c-format
+msgid "Checksums enabled in cluster\n"
+msgstr "Kontrolní součty zapnuty v clusteru\n"
+
+#: pg_checksums.c:669
+#, c-format
+msgid "Checksums disabled in cluster\n"
+msgstr "Kontrolní součty vypnuty v clusteru\n"
+
+#~ msgid "Report bugs to <pgsql-bugs@lists.postgresql.org>.\n"
+#~ msgstr "Chyby hlaste na adresu <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_checksums/po/de.po b/src/bin/pg_checksums/po/de.po
new file mode 100644
index 0000000..d30fb2b
--- /dev/null
+++ b/src/bin/pg_checksums/po/de.po
@@ -0,0 +1,310 @@
+# German message translation file for pg_checksums
+# Copyright (C) 2021 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Peter Eisentraut <peter@eisentraut.org>, 2018 - 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 13\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-01-12 03:47+0000\n"
+"PO-Revision-Date: 2021-01-12 09:21+0100\n"
+"Last-Translator: Peter Eisentraut <peter@eisentraut.org>\n"
+"Language-Team: German <pgsql-translators@postgresql.org>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../../../src/common/logging.c:236
+#, c-format
+msgid "fatal: "
+msgstr "Fatal: "
+
+#: ../../../src/common/logging.c:243
+#, c-format
+msgid "error: "
+msgstr "Fehler: "
+
+#: ../../../src/common/logging.c:250
+#, c-format
+msgid "warning: "
+msgstr "Warnung: "
+
+#: pg_checksums.c:75
+#, c-format
+msgid ""
+"%s enables, disables, or verifies data checksums in a PostgreSQL database cluster.\n"
+"\n"
+msgstr ""
+"%s überprüft die Datenprüfsummen in einem PostgreSQL-Datenbankcluster oder schaltet sie ein oder aus.\n"
+"\n"
+
+#: pg_checksums.c:76
+#, c-format
+msgid "Usage:\n"
+msgstr "Aufruf:\n"
+
+#: pg_checksums.c:77
+#, c-format
+msgid " %s [OPTION]... [DATADIR]\n"
+msgstr " %s [OPTION]... [DATENVERZEICHNIS]\n"
+
+#: pg_checksums.c:78
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Optionen:\n"
+
+#: pg_checksums.c:79
+#, c-format
+msgid " [-D, --pgdata=]DATADIR data directory\n"
+msgstr " [-D, --pgdata=]VERZ Datenbankverzeichnis\n"
+
+#: pg_checksums.c:80
+#, c-format
+msgid " -c, --check check data checksums (default)\n"
+msgstr " -c, --check Datenprüfsummen prüfen (Voreinstellung)\n"
+
+#: pg_checksums.c:81
+#, c-format
+msgid " -d, --disable disable data checksums\n"
+msgstr " -d, --disable Datenprüfsummen ausschalten\n"
+
+#: pg_checksums.c:82
+#, c-format
+msgid " -e, --enable enable data checksums\n"
+msgstr " -e, --enable Datenprüfsummen einschalten\n"
+
+#: pg_checksums.c:83
+#, c-format
+msgid " -f, --filenode=FILENODE check only relation with specified filenode\n"
+msgstr " -f, --filenode=FILENODE nur Relation mit angegebenem Filenode prüfen\n"
+
+#: pg_checksums.c:84
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr ""
+" -N, --no-sync nicht warten, bis Änderungen sicher auf Festplatte\n"
+" geschrieben sind\n"
+
+#: pg_checksums.c:85
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress Fortschrittsinformationen zeigen\n"
+
+#: pg_checksums.c:86
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose »Verbose«-Modus\n"
+
+#: pg_checksums.c:87
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version Versionsinformationen anzeigen, dann beenden\n"
+
+#: pg_checksums.c:88
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help diese Hilfe anzeigen, dann beenden\n"
+
+#: pg_checksums.c:89
+#, c-format
+msgid ""
+"\n"
+"If no data directory (DATADIR) is specified, the environment variable PGDATA\n"
+"is used.\n"
+"\n"
+msgstr ""
+"\n"
+"Wenn kein Datenverzeichnis angegeben ist, wird die Umgebungsvariable\n"
+"PGDATA verwendet.\n"
+"\n"
+
+#: pg_checksums.c:91
+#, c-format
+msgid "Report bugs to <%s>.\n"
+msgstr "Berichten Sie Fehler an <%s>.\n"
+
+#: pg_checksums.c:92
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s Homepage: <%s>\n"
+
+#: pg_checksums.c:161
+#, c-format
+msgid "%*s/%s MB (%d%%) computed"
+msgstr "%*s/%s MB (%d%%) berechnet"
+
+#: pg_checksums.c:207
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "konnte Datei »%s« nicht öffnen: %m"
+
+#: pg_checksums.c:223
+#, c-format
+msgid "could not read block %u in file \"%s\": %m"
+msgstr "konnte Block %u in Datei »%s« nicht lesen: %m"
+
+#: pg_checksums.c:226
+#, c-format
+msgid "could not read block %u in file \"%s\": read %d of %d"
+msgstr "konnte Block %u in Datei »%s« nicht lesen: %d von %d gelesen"
+
+#: pg_checksums.c:243
+#, c-format
+msgid "checksum verification failed in file \"%s\", block %u: calculated checksum %X but block contains %X"
+msgstr "Prüfsummenprüfung fehlgeschlagen in Datei »%s«, Block %u: berechnete Prüfsumme ist %X, aber der Block enthält %X"
+
+#: pg_checksums.c:258
+#, c-format
+msgid "seek failed for block %u in file \"%s\": %m"
+msgstr "seek fehlgeschlagen für Block %u in Datei »%s«: %m"
+
+#: pg_checksums.c:267
+#, c-format
+msgid "could not write block %u in file \"%s\": %m"
+msgstr "konnte Block %u in Datei »%s« nicht schreiben: %m"
+
+#: pg_checksums.c:270
+#, c-format
+msgid "could not write block %u in file \"%s\": wrote %d of %d"
+msgstr "konnte Block %u in Datei »%s« nicht schreiben: %d von %d geschrieben"
+
+#: pg_checksums.c:283
+#, c-format
+msgid "checksums verified in file \"%s\""
+msgstr "Prüfsummen wurden überprüft in Datei »%s«"
+
+#: pg_checksums.c:285
+#, c-format
+msgid "checksums enabled in file \"%s\""
+msgstr "Prüfsummen wurden eingeschaltet in Datei »%s«"
+
+#: pg_checksums.c:310
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "konnte Verzeichnis »%s« nicht öffnen: %m"
+
+#: pg_checksums.c:337 pg_checksums.c:416
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "konnte »stat« für Datei »%s« nicht ausführen: %m"
+
+#: pg_checksums.c:364
+#, c-format
+msgid "invalid segment number %d in file name \"%s\""
+msgstr "ungültige Segmentnummer %d in Dateiname »%s«"
+
+#: pg_checksums.c:497
+#, c-format
+msgid "invalid filenode specification, must be numeric: %s"
+msgstr "ungültige Relfilenode-Angabe, muss numerisch sein: %s"
+
+#: pg_checksums.c:515 pg_checksums.c:531 pg_checksums.c:541 pg_checksums.c:550
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Versuchen Sie »%s --help« für weitere Informationen.\n"
+
+#: pg_checksums.c:530
+#, c-format
+msgid "no data directory specified"
+msgstr "kein Datenverzeichnis angegeben"
+
+#: pg_checksums.c:539
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "zu viele Kommandozeilenargumente (das erste ist »%s«)"
+
+#: pg_checksums.c:549
+#, c-format
+msgid "option -f/--filenode can only be used with --check"
+msgstr "Option -f/--filenode kann nur mit --check verwendet werden"
+
+#: pg_checksums.c:559
+#, c-format
+msgid "pg_control CRC value is incorrect"
+msgstr "CRC-Wert in pg_control ist falsch"
+
+#: pg_checksums.c:565
+#, c-format
+msgid "cluster is not compatible with this version of pg_checksums"
+msgstr "die Cluster sind nicht mit dieser Version von pg_checksums kompatibel"
+
+#: pg_checksums.c:571
+#, c-format
+msgid "database cluster is not compatible"
+msgstr "Datenbank-Cluster ist nicht kompatibel"
+
+#: pg_checksums.c:572
+#, c-format
+msgid "The database cluster was initialized with block size %u, but pg_checksums was compiled with block size %u.\n"
+msgstr "Der Datenbank-Cluster wurde mit Blockgröße %u initialisiert, aber pg_checksums wurde mit Blockgröße %u kompiliert.\n"
+
+#: pg_checksums.c:585
+#, c-format
+msgid "cluster must be shut down"
+msgstr "Cluster muss heruntergefahren sein"
+
+#: pg_checksums.c:592
+#, c-format
+msgid "data checksums are not enabled in cluster"
+msgstr "Datenprüfsummen sind im Cluster nicht eingeschaltet"
+
+#: pg_checksums.c:599
+#, c-format
+msgid "data checksums are already disabled in cluster"
+msgstr "Datenprüfsummen sind im Cluster bereits ausgeschaltet"
+
+#: pg_checksums.c:606
+#, c-format
+msgid "data checksums are already enabled in cluster"
+msgstr "Datenprüfsummen sind im Cluster bereits eingeschaltet"
+
+#: pg_checksums.c:632
+#, c-format
+msgid "Checksum operation completed\n"
+msgstr "Prüfsummenoperation abgeschlossen\n"
+
+#: pg_checksums.c:633
+#, c-format
+msgid "Files scanned: %s\n"
+msgstr "Überprüfte Dateien: %s\n"
+
+#: pg_checksums.c:634
+#, c-format
+msgid "Blocks scanned: %s\n"
+msgstr "Überprüfte Blöcke: %s\n"
+
+#: pg_checksums.c:637
+#, c-format
+msgid "Bad checksums: %s\n"
+msgstr "Falsche Prüfsummen: %s\n"
+
+#: pg_checksums.c:638 pg_checksums.c:665
+#, c-format
+msgid "Data checksum version: %u\n"
+msgstr "Datenprüfsummenversion: %u\n"
+
+#: pg_checksums.c:657
+#, c-format
+msgid "syncing data directory"
+msgstr "synchronisiere Datenverzeichnis"
+
+#: pg_checksums.c:661
+#, c-format
+msgid "updating control file"
+msgstr "aktualisiere Kontrolldatei"
+
+#: pg_checksums.c:667
+#, c-format
+msgid "Checksums enabled in cluster\n"
+msgstr "Prüfsummen wurden im Cluster eingeschaltet\n"
+
+#: pg_checksums.c:669
+#, c-format
+msgid "Checksums disabled in cluster\n"
+msgstr "Prüfsummen wurden im Cluster ausgeschaltet\n"
diff --git a/src/bin/pg_checksums/po/el.po b/src/bin/pg_checksums/po/el.po
new file mode 100644
index 0000000..0632891
--- /dev/null
+++ b/src/bin/pg_checksums/po/el.po
@@ -0,0 +1,311 @@
+# Greek message translation file for pg_checksums
+# Copyright (C) 2021 PostgreSQL Global Development Group
+# This file is distributed under the same license as the pg_checksums (PostgreSQL) package.
+# Georgios Kokolatos <gkokolatos@pm.me>, 2021
+#
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_checksums (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-07-21 05:18+0000\n"
+"PO-Revision-Date: 2021-07-21 09:45+0200\n"
+"Last-Translator: Georgios Kokolatos <gkokolatos@pm.me>\n"
+"Language-Team: \n"
+"Language: el\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 3.0\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "κρίσιμο: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "σφάλμα: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "προειδοποίηση: "
+
+#: pg_checksums.c:75
+#, c-format
+msgid ""
+"%s enables, disables, or verifies data checksums in a PostgreSQL database cluster.\n"
+"\n"
+msgstr ""
+"%s ενεργοποιεί, απενεργοποιεί ή επαληθεύει τα αθροίσματα ελέγχου δεδομένων σε μία συστάδα βάσεων δεδομένων PostgreSQL.\n"
+"\n"
+
+#: pg_checksums.c:76
+#, c-format
+msgid "Usage:\n"
+msgstr "Χρήση:\n"
+
+#: pg_checksums.c:77
+#, c-format
+msgid " %s [OPTION]... [DATADIR]\n"
+msgstr " %s [ΕΠΙΛΟΓΗ]... [DATADIR]\n"
+
+#: pg_checksums.c:78
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Επιλογές:\n"
+
+#: pg_checksums.c:79
+#, c-format
+msgid " [-D, --pgdata=]DATADIR data directory\n"
+msgstr " [-D, --pgdata=]DATADIR κατάλογος δεδομένων\n"
+
+#: pg_checksums.c:80
+#, c-format
+msgid " -c, --check check data checksums (default)\n"
+msgstr " -c, --check έλεγξε αθροίσματα ελέγχου δεδομένων (προεπιλογή)\n"
+
+#: pg_checksums.c:81
+#, c-format
+msgid " -d, --disable disable data checksums\n"
+msgstr " -d, --disable απενεργοποίησε τα αθροίσματα ελέγχου δεδομένων\n"
+
+#: pg_checksums.c:82
+#, c-format
+msgid " -e, --enable enable data checksums\n"
+msgstr " -e, --enable ενεργοποίησε τα αθροίσματα ελέγχου δεδομένων\n"
+
+#: pg_checksums.c:83
+#, c-format
+msgid " -f, --filenode=FILENODE check only relation with specified filenode\n"
+msgstr " -f, --filenode=FILENODE έλεγξε μόνο τη σχέση με το καθορισμένο filenode\n"
+
+#: pg_checksums.c:84
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync να μην αναμένει την ασφαλή εγγραφή αλλαγών στον δίσκο\n"
+
+#: pg_checksums.c:85
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress εμφάνισε πληροφορίες προόδου\n"
+
+#: pg_checksums.c:86
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose περιφραστικά μηνύματα εξόδου\n"
+
+#: pg_checksums.c:87
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version εμφάνισε πληροφορίες έκδοσης, στη συνέχεια έξοδος\n"
+
+#: pg_checksums.c:88
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help εμφάνισε αυτό το μήνυμα βοήθειας, στη συνέχεια έξοδος\n"
+
+#: pg_checksums.c:89
+#, c-format
+msgid ""
+"\n"
+"If no data directory (DATADIR) is specified, the environment variable PGDATA\n"
+"is used.\n"
+"\n"
+msgstr ""
+"\n"
+"Εάν δεν έχει καθοριστεί κατάλογος δεδομένων (DATADIR), χρησιμοποιείται η\n"
+"μεταβλητή περιβάλλοντος PGDATA.\n"
+"\n"
+
+#: pg_checksums.c:91
+#, c-format
+msgid "Report bugs to <%s>.\n"
+msgstr "Υποβάλετε αναφορές σφάλματων σε <%s>.\n"
+
+#: pg_checksums.c:92
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s αρχική σελίδα: <%s>\n"
+
+#: pg_checksums.c:161
+#, c-format
+msgid "%*s/%s MB (%d%%) computed"
+msgstr "%*s/%s MB (%d%%) Υπολογίζεται"
+
+#: pg_checksums.c:207
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "δεν ήταν δυνατό το άνοιγμα του αρχείου «%s»: %m"
+
+#: pg_checksums.c:223
+#, c-format
+msgid "could not read block %u in file \"%s\": %m"
+msgstr "δεν ήταν δυνατή η ανάγνωση του μπλοκ %u στο αρχείο «%s»: %m"
+
+#: pg_checksums.c:226
+#, c-format
+msgid "could not read block %u in file \"%s\": read %d of %d"
+msgstr "δεν ήταν δυνατή η ανάγνωση του μπλοκ %u στο αρχείο «%s»: ανάγνωσε %d από %d"
+
+#: pg_checksums.c:250
+#, c-format
+msgid "checksum verification failed in file \"%s\", block %u: calculated checksum %X but block contains %X"
+msgstr "επαλήθευση του αθροίσματος ελέγχου απέτυχε στο αρχείο «%s», μπλοκ %u: υπολογισμένο άθροισμα ελέγχου %X αλλά το μπλοκ περιέχει %X"
+
+#: pg_checksums.c:265
+#, c-format
+msgid "seek failed for block %u in file \"%s\": %m"
+msgstr "αναζήτηση απέτυχε για μπλοκ %u στο αρχείο «%s»: %m"
+
+#: pg_checksums.c:274
+#, c-format
+msgid "could not write block %u in file \"%s\": %m"
+msgstr "δεν ήταν δυνατή η εγγραφή μπλοκ %u στο αρχείο «%s»: %m"
+
+#: pg_checksums.c:277
+#, c-format
+msgid "could not write block %u in file \"%s\": wrote %d of %d"
+msgstr "δεν ήταν δυνατή η εγγραφή μπλοκ %u στο αρχείο «%s»: έγραψε %d από %d"
+
+#: pg_checksums.c:290
+#, c-format
+msgid "checksums verified in file \"%s\""
+msgstr "επαληθευμένα αθροίσματα ελέγχου στο αρχείο «%s»"
+
+#: pg_checksums.c:292
+#, c-format
+msgid "checksums enabled in file \"%s\""
+msgstr "ενεργοποιημένα αθροίσματα ελέγχου στο αρχείο «%s»"
+
+#: pg_checksums.c:317
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "δεν ήταν δυνατό το άνοιγμα του καταλόγου «%s»: %m"
+
+#: pg_checksums.c:344 pg_checksums.c:423
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "δεν ήταν δυνατή η εκτέλεση stat στο αρχείο «%s»: %m"
+
+#: pg_checksums.c:371
+#, c-format
+msgid "invalid segment number %d in file name \"%s\""
+msgstr "μη έγκυρος αριθμός τμήματος %d στο αρχείο με όνομα «%s»"
+
+#: pg_checksums.c:504
+#, c-format
+msgid "invalid filenode specification, must be numeric: %s"
+msgstr "μη έγκυρη προδιαγραφή filenode, πρέπει να είναι αριθμητική: %s"
+
+#: pg_checksums.c:522 pg_checksums.c:538 pg_checksums.c:548 pg_checksums.c:557
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Δοκιμάστε «%s --help» για περισσότερες πληροφορίες.\n"
+
+#: pg_checksums.c:537
+#, c-format
+msgid "no data directory specified"
+msgstr "δεν ορίστηκε κατάλογος δεδομένων"
+
+#: pg_checksums.c:546
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "πάρα πολλές παράμετροι εισόδου από την γραμμή εντολών (η πρώτη είναι η «%s»)"
+
+#: pg_checksums.c:556
+#, c-format
+msgid "option -f/--filenode can only be used with --check"
+msgstr "η επιλογή -f/--filenode μπορεί να χρησιμοποιηθεί μόνο μαζί με την --check"
+
+#: pg_checksums.c:566
+#, c-format
+msgid "pg_control CRC value is incorrect"
+msgstr "η τιμή pg_control CRC είναι λανθασμένη"
+
+#: pg_checksums.c:572
+#, c-format
+msgid "cluster is not compatible with this version of pg_checksums"
+msgstr "η συστάδα δεν είναι συμβατή με αυτήν την έκδοση pg_checksums"
+
+#: pg_checksums.c:578
+#, c-format
+msgid "database cluster is not compatible"
+msgstr "η συστάδα βάσεων δεδομένων δεν είναι συμβατή"
+
+#: pg_checksums.c:579
+#, c-format
+msgid "The database cluster was initialized with block size %u, but pg_checksums was compiled with block size %u.\n"
+msgstr "Η συστάδα βάσεων δεδομένων αρχικοποιήθηκε με μέγεθος μπλοκ %u, αλλά το pg_checksums μεταγλωττίστηκε με μέγεθος μπλοκ %u .\n"
+
+#: pg_checksums.c:592
+#, c-format
+msgid "cluster must be shut down"
+msgstr "η συστάδα πρέπει να τερματιστεί"
+
+#: pg_checksums.c:599
+#, c-format
+msgid "data checksums are not enabled in cluster"
+msgstr "τα αθροίσματα ελέγχου δεδομένων δεν είναι ενεργοποιημένα στη συστάδα"
+
+#: pg_checksums.c:606
+#, c-format
+msgid "data checksums are already disabled in cluster"
+msgstr "τα αθροίσματα ελέγχου δεδομένων είναι ήδη απενεργοποιημένα στη συστάδα"
+
+#: pg_checksums.c:613
+#, c-format
+msgid "data checksums are already enabled in cluster"
+msgstr "τα αθροίσματα ελέγχου δεδομένων είναι ήδη ενεργοποιημένα στη συστάδα"
+
+#: pg_checksums.c:639
+#, c-format
+msgid "Checksum operation completed\n"
+msgstr "Ολοκληρώθηκε η λειτουργία του αθροίσματος ελέγχου\n"
+
+#: pg_checksums.c:640
+#, c-format
+msgid "Files scanned: %s\n"
+msgstr "Αρχεία που σαρώθηκαν: %s\n"
+
+#: pg_checksums.c:641
+#, c-format
+msgid "Blocks scanned: %s\n"
+msgstr "Μπλοκ που σαρώθηκαν: %s\n"
+
+#: pg_checksums.c:644
+#, c-format
+msgid "Bad checksums: %s\n"
+msgstr "Εσφαλμένα αθροίσματα ελέγχου: %s\n"
+
+#: pg_checksums.c:645 pg_checksums.c:672
+#, c-format
+msgid "Data checksum version: %u\n"
+msgstr "Έκδοση αθροισμάτων ελέγχου: %u\n"
+
+#: pg_checksums.c:664
+#, c-format
+msgid "syncing data directory"
+msgstr "συγχρονίζεται κατάλογος δεδομένων"
+
+#: pg_checksums.c:668
+#, c-format
+msgid "updating control file"
+msgstr "ενημερώνεται αρχείο ελέγχου"
+
+#: pg_checksums.c:674
+#, c-format
+msgid "Checksums enabled in cluster\n"
+msgstr "τα αθροίσματα ελέγχου δεδομένων είναι ενεργοποιημένα στη συστάδα\n"
+
+#: pg_checksums.c:676
+#, c-format
+msgid "Checksums disabled in cluster\n"
+msgstr "Τα αθροίσματα ελέγχου δεδομένων είναι απενεργοποιημένα στη συστάδα\n"
diff --git a/src/bin/pg_checksums/po/es.po b/src/bin/pg_checksums/po/es.po
new file mode 100644
index 0000000..a9c5701
--- /dev/null
+++ b/src/bin/pg_checksums/po/es.po
@@ -0,0 +1,312 @@
+# Spanish message translation file for pg_checksums
+#
+# Copyright (c) 2019-2021, PostgreSQL Global Development Group
+#
+# This file is distributed under the same license as the pg_checksums (PostgreSQL) package.
+# Álvaro Herrera <alvherre@alvh.no-ip.org>, 2019.
+# Carlos Chapi <carloswaldo@babelruins.org>, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_checksums (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-08-07 20:37+0000\n"
+"PO-Revision-Date: 2021-05-20 21:25-0500\n"
+"Last-Translator: Carlos Chapi <carloswaldo@babelruins.org>\n"
+"Language-Team: pgsql-es-ayuda <pgsql-es-ayuda@lists.postgresql.org>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.4.2\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "fatal: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "error: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "precaución: "
+
+#: pg_checksums.c:75
+#, c-format
+msgid ""
+"%s enables, disables, or verifies data checksums in a PostgreSQL database cluster.\n"
+"\n"
+msgstr ""
+"%s activa, desactiva o verifica checksums de datos en un clúster PostgreSQL.\n"
+"\n"
+
+#: pg_checksums.c:76
+#, c-format
+msgid "Usage:\n"
+msgstr "Empleo:\n"
+
+#: pg_checksums.c:77
+#, c-format
+msgid " %s [OPTION]... [DATADIR]\n"
+msgstr " %s [OPCIÓN]... [DATADIR]\n"
+
+#: pg_checksums.c:78
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Opciones:\n"
+
+#: pg_checksums.c:79
+#, c-format
+msgid " [-D, --pgdata=]DATADIR data directory\n"
+msgstr " [-D, --pgdata=]DATADIR directorio de datos\n"
+
+#: pg_checksums.c:80
+#, c-format
+msgid " -c, --check check data checksums (default)\n"
+msgstr " -c, --check verificar checksums (por omisión)\n"
+
+#: pg_checksums.c:81
+#, c-format
+msgid " -d, --disable disable data checksums\n"
+msgstr " -d, --disable desactivar checksums\n"
+
+#: pg_checksums.c:82
+#, c-format
+msgid " -e, --enable enable data checksums\n"
+msgstr " -e, --enable activar checksums\n"
+
+#: pg_checksums.c:83
+#, c-format
+msgid " -f, --filenode=FILENODE check only relation with specified filenode\n"
+msgstr " -f, --filenode=FILENODE verificar sólo la relación con el filenode dado\n"
+
+#: pg_checksums.c:84
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync no esperar que los cambios se sincronicen a disco\n"
+
+#: pg_checksums.c:85
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress mostrar información de progreso\n"
+
+#: pg_checksums.c:86
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose desplegar mensajes verbosos\n"
+
+#: pg_checksums.c:87
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version mostrar información de versión y salir\n"
+
+#: pg_checksums.c:88
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help mostrar esta ayuda y salir\n"
+
+#: pg_checksums.c:89
+#, c-format
+msgid ""
+"\n"
+"If no data directory (DATADIR) is specified, the environment variable PGDATA\n"
+"is used.\n"
+"\n"
+msgstr ""
+"\n"
+"Si no se especifica un directorio de datos (DATADIR), se utilizará\n"
+"la variable de entorno PGDATA.\n"
+"\n"
+
+#: pg_checksums.c:91
+#, c-format
+msgid "Report bugs to <%s>.\n"
+msgstr "Reportar errores a <%s>.\n"
+
+#: pg_checksums.c:92
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Sitio web de %s: <%s>\n"
+
+#: pg_checksums.c:161
+#, c-format
+msgid "%*s/%s MB (%d%%) computed"
+msgstr "%*s/%s MB (%d%%) calculado"
+
+#: pg_checksums.c:207
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "no se pudo abrir el archivo «%s»: %m"
+
+#: pg_checksums.c:223
+#, c-format
+msgid "could not read block %u in file \"%s\": %m"
+msgstr "no se pudo leer el bloque %u del archivo «%s»: %m"
+
+#: pg_checksums.c:226
+#, c-format
+msgid "could not read block %u in file \"%s\": read %d of %d"
+msgstr "no se pudo leer bloque %u en archivo «%s»: leídos %d de %d"
+
+#: pg_checksums.c:250
+#, c-format
+msgid "checksum verification failed in file \"%s\", block %u: calculated checksum %X but block contains %X"
+msgstr "verificación de checksums falló en archivo «%s», bloque %u: checksum calculado %X pero bloque contiene %X"
+
+#: pg_checksums.c:265
+#, c-format
+msgid "seek failed for block %u in file \"%s\": %m"
+msgstr "posicionamiento (seek) falló para el bloque %u en archivo «%s»: %m"
+
+#: pg_checksums.c:274
+#, c-format
+msgid "could not write block %u in file \"%s\": %m"
+msgstr "no se pudo escribir el bloque %u en el archivo «%s»: %m"
+
+#: pg_checksums.c:277
+#, c-format
+msgid "could not write block %u in file \"%s\": wrote %d of %d"
+msgstr "no se pudo escribir el bloque %u en el archivo «%s»: se escribieron %d de %d"
+
+#: pg_checksums.c:290
+#, c-format
+msgid "checksums verified in file \"%s\""
+msgstr "checksums verificados en archivo «%s»"
+
+#: pg_checksums.c:292
+#, c-format
+msgid "checksums enabled in file \"%s\""
+msgstr "checksums activados en archivo «%s»"
+
+#: pg_checksums.c:317
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "no se pudo abrir el directorio «%s»: %m"
+
+#: pg_checksums.c:344 pg_checksums.c:423
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "no se pudo hacer stat al archivo «%s»: %m"
+
+#: pg_checksums.c:371
+#, c-format
+msgid "invalid segment number %d in file name \"%s\""
+msgstr "número de segmento %d no válido en nombre de archivo «%s»"
+
+#: pg_checksums.c:504
+#, c-format
+msgid "invalid filenode specification, must be numeric: %s"
+msgstr "especificación de filenode no válida: deben ser numérica: %s"
+
+#: pg_checksums.c:522 pg_checksums.c:538 pg_checksums.c:548 pg_checksums.c:557
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Pruebe «%s --help» para mayor información.\n"
+
+#: pg_checksums.c:537
+#, c-format
+msgid "no data directory specified"
+msgstr "no se especificó el directorio de datos"
+
+#: pg_checksums.c:546
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "demasiados argumentos en la línea de órdenes (el primero es «%s»)"
+
+#: pg_checksums.c:556
+#, c-format
+msgid "option -f/--filenode can only be used with --check"
+msgstr "la opción -f/--filenode sólo puede usarse con --check"
+
+#: pg_checksums.c:566
+#, c-format
+msgid "pg_control CRC value is incorrect"
+msgstr "el valor de CRC de pg_control es incorrecto"
+
+#: pg_checksums.c:572
+#, c-format
+msgid "cluster is not compatible with this version of pg_checksums"
+msgstr "el clúster no es compatible con esta versión de pg_checksums"
+
+#: pg_checksums.c:578
+#, c-format
+msgid "database cluster is not compatible"
+msgstr "el clúster de bases de datos no es compatible"
+
+#: pg_checksums.c:579
+#, c-format
+msgid "The database cluster was initialized with block size %u, but pg_checksums was compiled with block size %u.\n"
+msgstr "El clúster fue inicializado con tamaño de bloque %u, pero pg_checksums fue compilado con tamaño de bloques %u.\n"
+
+#: pg_checksums.c:592
+#, c-format
+msgid "cluster must be shut down"
+msgstr "el clúster debe estar apagado"
+
+#: pg_checksums.c:599
+#, c-format
+msgid "data checksums are not enabled in cluster"
+msgstr "los checksums de datos no están activados en el clúster"
+
+#: pg_checksums.c:606
+#, c-format
+msgid "data checksums are already disabled in cluster"
+msgstr "los checksums de datos ya están desactivados en el clúster"
+
+#: pg_checksums.c:613
+#, c-format
+msgid "data checksums are already enabled in cluster"
+msgstr "los checksums de datos ya están activados en el clúster"
+
+#: pg_checksums.c:639
+#, c-format
+msgid "Checksum operation completed\n"
+msgstr "Operación de checksums completa\n"
+
+#: pg_checksums.c:640
+#, c-format
+msgid "Files scanned: %s\n"
+msgstr "Archivos recorridos: %s\n"
+
+#: pg_checksums.c:641
+#, c-format
+msgid "Blocks scanned: %s\n"
+msgstr "Bloques recorridos: %s\n"
+
+#: pg_checksums.c:644
+#, c-format
+msgid "Bad checksums: %s\n"
+msgstr "Checksums incorrectos: %s\n"
+
+#: pg_checksums.c:645 pg_checksums.c:672
+#, c-format
+msgid "Data checksum version: %u\n"
+msgstr "Versión de checksums de datos: %u\n"
+
+#: pg_checksums.c:664
+#, c-format
+msgid "syncing data directory"
+msgstr "sincronizando directorio de datos"
+
+#: pg_checksums.c:668
+#, c-format
+msgid "updating control file"
+msgstr "actualizando archivo de control"
+
+#: pg_checksums.c:674
+#, c-format
+msgid "Checksums enabled in cluster\n"
+msgstr "Checksums activos en el clúster\n"
+
+#: pg_checksums.c:676
+#, c-format
+msgid "Checksums disabled in cluster\n"
+msgstr "Checksums inactivos en el clúster\n"
diff --git a/src/bin/pg_checksums/po/fr.po b/src/bin/pg_checksums/po/fr.po
new file mode 100644
index 0000000..9c4863b
--- /dev/null
+++ b/src/bin/pg_checksums/po/fr.po
@@ -0,0 +1,338 @@
+# LANGUAGE message translation file for pg_verify_checksums
+# Copyright (C) 2018 PostgreSQL Global Development Group
+# This file is distributed under the same license as the pg_verify_checksums (PostgreSQL) package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2018.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_verify_checksums (PostgreSQL) 12\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-12-23 15:18+0000\n"
+"PO-Revision-Date: 2020-12-24 11:45+0100\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.4.2\n"
+
+#: ../../../src/common/logging.c:236
+#, c-format
+msgid "fatal: "
+msgstr "fatal : "
+
+#: ../../../src/common/logging.c:243
+#, c-format
+msgid "error: "
+msgstr "erreur : "
+
+#: ../../../src/common/logging.c:250
+#, c-format
+msgid "warning: "
+msgstr "attention : "
+
+#: pg_checksums.c:75
+#, c-format
+msgid ""
+"%s enables, disables, or verifies data checksums in a PostgreSQL database cluster.\n"
+"\n"
+msgstr ""
+"%s active, désactive ou vérifie les sommes de contrôle de données dans\n"
+"une instance PostgreSQL.\n"
+"\n"
+
+#: pg_checksums.c:76
+#, c-format
+msgid "Usage:\n"
+msgstr "Usage :\n"
+
+#: pg_checksums.c:77
+#, c-format
+msgid " %s [OPTION]... [DATADIR]\n"
+msgstr " %s [OPTION]... [RÉP_DONNÉES]\n"
+
+#: pg_checksums.c:78
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Options :\n"
+
+#: pg_checksums.c:79
+#, c-format
+msgid " [-D, --pgdata=]DATADIR data directory\n"
+msgstr " [-D, --pgdata=]REP_DONNEES répertoire des données\n"
+
+#: pg_checksums.c:80
+#, c-format
+msgid " -c, --check check data checksums (default)\n"
+msgstr " -c, --check vérifie les sommes de contrôle (par défaut)\n"
+
+#: pg_checksums.c:81
+#, c-format
+msgid " -d, --disable disable data checksums\n"
+msgstr " -d, --disable désactive les sommes de contrôle\n"
+
+#: pg_checksums.c:82
+#, c-format
+msgid " -e, --enable enable data checksums\n"
+msgstr " -e, --enable active les sommes de contrôle\n"
+
+#: pg_checksums.c:83
+#, c-format
+msgid " -f, --filenode=FILENODE check only relation with specified filenode\n"
+msgstr ""
+" -f, --filenode=FILENODE vérifie seulement la relation dont l'identifiant\n"
+" relfilenode est indiqué\n"
+
+#: pg_checksums.c:84
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr ""
+" -N, --no-sync n'attend pas que les modifications soient\n"
+" proprement écrites sur disque\n"
+
+#: pg_checksums.c:85
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress affiche la progression de l'opération\n"
+
+#: pg_checksums.c:86
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose affiche des messages verbeux\n"
+
+#: pg_checksums.c:87
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version affiche la version puis quitte\n"
+
+#: pg_checksums.c:88
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help affiche cette aide puis quitte\n"
+
+#: pg_checksums.c:89
+#, c-format
+msgid ""
+"\n"
+"If no data directory (DATADIR) is specified, the environment variable PGDATA\n"
+"is used.\n"
+"\n"
+msgstr ""
+"\n"
+"Si aucun répertoire (RÉP_DONNÉES) n'est indiqué, la variable d'environnement\n"
+"PGDATA est utilisée.\n"
+"\n"
+
+#: pg_checksums.c:91
+#, c-format
+msgid "Report bugs to <%s>.\n"
+msgstr "Rapporter les bogues à <%s>.\n"
+
+#: pg_checksums.c:92
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Page d'accueil de %s : <%s>\n"
+
+#: pg_checksums.c:161
+#, c-format
+msgid "%*s/%s MB (%d%%) computed"
+msgstr "%*s/%s Mo (%d%%) traités"
+
+#: pg_checksums.c:207
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "n'a pas pu ouvrir le fichier « %s » : %m"
+
+#: pg_checksums.c:223
+#, c-format
+msgid "could not read block %u in file \"%s\": %m"
+msgstr "n'a pas pu lire le bloc %u dans le fichier « %s » : %m"
+
+#: pg_checksums.c:226
+#, c-format
+msgid "could not read block %u in file \"%s\": read %d of %d"
+msgstr "n'a pas pu lire le bloc %u dans le fichier « %s » : %d lus sur %d"
+
+#: pg_checksums.c:243
+#, c-format
+msgid "checksum verification failed in file \"%s\", block %u: calculated checksum %X but block contains %X"
+msgstr "échec de la vérification de la somme de contrôle dans le fichier « %s », bloc %u : somme de contrôle calculée %X, alors que le bloc contient %X"
+
+#: pg_checksums.c:258
+#, c-format
+msgid "seek failed for block %u in file \"%s\": %m"
+msgstr "n'a pas pu rechercher le bloc %u dans le fichier « %s » : %m"
+
+#: pg_checksums.c:267
+#, c-format
+msgid "could not write block %u in file \"%s\": %m"
+msgstr "n'a pas pu écrire le bloc %u dans le fichier « %s » : %m"
+
+#: pg_checksums.c:270
+#, c-format
+msgid "could not write block %u in file \"%s\": wrote %d of %d"
+msgstr "n'a pas pu écrire le bloc %u du fichier « %s » : a écrit %d octets sur %d"
+
+#: pg_checksums.c:283
+#, c-format
+msgid "checksums verified in file \"%s\""
+msgstr "sommes de contrôle vérifiées dans le fichier « %s »"
+
+#: pg_checksums.c:285
+#, c-format
+msgid "checksums enabled in file \"%s\""
+msgstr "sommes de contrôle activées dans le fichier « %s »"
+
+#: pg_checksums.c:310
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "n'a pas pu ouvrir le répertoire « %s » : %m"
+
+#: pg_checksums.c:337 pg_checksums.c:416
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "n'a pas pu tester le fichier « %s » : %m"
+
+#: pg_checksums.c:364
+#, c-format
+msgid "invalid segment number %d in file name \"%s\""
+msgstr "numéro de segment %d invalide dans le nom de fichier « %s »"
+
+#: pg_checksums.c:497
+#, c-format
+msgid "invalid filenode specification, must be numeric: %s"
+msgstr "spécification invalide du relfilnode, doit être numérique : %s"
+
+#: pg_checksums.c:515 pg_checksums.c:531 pg_checksums.c:541 pg_checksums.c:550
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Essayez « %s --help » pour plus d'informations.\n"
+
+#: pg_checksums.c:530
+#, c-format
+msgid "no data directory specified"
+msgstr "aucun répertoire de données indiqué"
+
+#: pg_checksums.c:539
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "trop d'arguments en ligne de commande (le premier étant « %s »)"
+
+#: pg_checksums.c:549
+#, c-format
+msgid "option -f/--filenode can only be used with --check"
+msgstr "l'option « -f/--filenode » peut seulement être utilisée avec --check"
+
+#: pg_checksums.c:559
+#, c-format
+msgid "pg_control CRC value is incorrect"
+msgstr "la valeur CRC de pg_control n'est pas correcte"
+
+#: pg_checksums.c:565
+#, c-format
+msgid "cluster is not compatible with this version of pg_checksums"
+msgstr "l'instance n'est pas compatible avec cette version de pg_checksums"
+
+#: pg_checksums.c:571
+#, c-format
+msgid "database cluster is not compatible"
+msgstr "l'instance n'est pas compatible"
+
+#: pg_checksums.c:572
+#, c-format
+msgid "The database cluster was initialized with block size %u, but pg_checksums was compiled with block size %u.\n"
+msgstr "L'instance a été initialisée avec une taille de bloc à %u alors que pg_checksums a été compilé avec une taille de bloc à %u.\n"
+
+#: pg_checksums.c:585
+#, c-format
+msgid "cluster must be shut down"
+msgstr "l'instance doit être arrêtée"
+
+#: pg_checksums.c:592
+#, c-format
+msgid "data checksums are not enabled in cluster"
+msgstr "les sommes de contrôle sur les données ne sont pas activées sur cette instance"
+
+#: pg_checksums.c:599
+#, c-format
+msgid "data checksums are already disabled in cluster"
+msgstr "les sommes de contrôle sur les données sont déjà désactivées sur cette instance"
+
+#: pg_checksums.c:606
+#, c-format
+msgid "data checksums are already enabled in cluster"
+msgstr "les sommes de contrôle sur les données sont déjà activées sur cette instance"
+
+#: pg_checksums.c:632
+#, c-format
+msgid "Checksum operation completed\n"
+msgstr "Opération sur les sommes de contrôle terminée\n"
+
+#: pg_checksums.c:633
+#, c-format
+msgid "Files scanned: %s\n"
+msgstr "Fichiers parcourus : %s\n"
+
+#: pg_checksums.c:634
+#, c-format
+msgid "Blocks scanned: %s\n"
+msgstr "Blocs parcourus : %s\n"
+
+#: pg_checksums.c:637
+#, c-format
+msgid "Bad checksums: %s\n"
+msgstr "Mauvaises sommes de contrôle : %s\n"
+
+#: pg_checksums.c:638 pg_checksums.c:665
+#, c-format
+msgid "Data checksum version: %u\n"
+msgstr "Version des sommes de contrôle sur les données : %u\n"
+
+#: pg_checksums.c:657
+#, c-format
+msgid "syncing data directory"
+msgstr "synchronisation du répertoire des données"
+
+#: pg_checksums.c:661
+#, c-format
+msgid "updating control file"
+msgstr "mise à jour du fichier de contrôle"
+
+#: pg_checksums.c:667
+#, c-format
+msgid "Checksums enabled in cluster\n"
+msgstr "Sommes de contrôle sur les données activées sur cette instance\n"
+
+#: pg_checksums.c:669
+#, c-format
+msgid "Checksums disabled in cluster\n"
+msgstr "Sommes de contrôle sur les données désactivées sur cette instance\n"
+
+#~ msgid "Report bugs to <pgsql-bugs@lists.postgresql.org>.\n"
+#~ msgstr "Rapporter les bogues à <pgsql-bugs@lists.postgresql.org>.\n"
+
+#~ msgid " -V, --version output version information, then exit\n"
+#~ msgstr " -V, --version affiche la version puis quitte\n"
+
+#~ msgid " -?, --help show this help, then exit\n"
+#~ msgstr " -?, --help affiche cette aide puis quitte\n"
+
+#~ msgid "%s: could not open file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu ouvrir le fichier « %s » : %s\n"
+
+#~ msgid "%s: could not open directory \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu ouvrir le répertoire « %s » : %s\n"
+
+#~ msgid "%s: could not stat file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu récupérer les informations sur le fichier « %s » : %s\n"
+
+#~ msgid "%s: no data directory specified\n"
+#~ msgstr "%s : aucun répertoire de données indiqué\n"
+
+#~ msgid "%s: too many command-line arguments (first is \"%s\")\n"
+#~ msgstr "%s : trop d'arguments en ligne de commande (le premier étant « %s »)\n"
diff --git a/src/bin/pg_checksums/po/ja.po b/src/bin/pg_checksums/po/ja.po
new file mode 100644
index 0000000..4ed7105
--- /dev/null
+++ b/src/bin/pg_checksums/po/ja.po
@@ -0,0 +1,307 @@
+# Japanese message translation file for pg_checksums
+# Copyright (C) 2022 PostgreSQL Global Development Group
+# This file is distributed under the same license as the pg_archivecleanup (PostgreSQL) package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_checksums (PostgreSQL 14)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-08-25 17:21+0900\n"
+"PO-Revision-Date: 2021-05-18 17:11+0900\n"
+"Last-Translator: Kyotaro Horiguchi <horikyota.ntt@gmail.com>\n"
+"Language-Team: Japan PostgreSQL Users Group <jpug-doc@ml.postgresql.jp>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.8.13\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "致命的エラー: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "エラー: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "警告: "
+
+#: pg_checksums.c:75
+#, c-format
+msgid ""
+"%s enables, disables, or verifies data checksums in a PostgreSQL database cluster.\n"
+"\n"
+msgstr ""
+"%s はPostgreSQLデータベースクラスタにおけるデータチェックサムの有効化、無効化および検証を行います。\n"
+"\n"
+
+#: pg_checksums.c:76
+#, c-format
+msgid "Usage:\n"
+msgstr "使用方法:\n"
+
+#: pg_checksums.c:77
+#, c-format
+msgid " %s [OPTION]... [DATADIR]\n"
+msgstr " %s [OPTION]... [DATADIR]\n"
+
+#: pg_checksums.c:78
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"オプション:\n"
+
+#: pg_checksums.c:79
+#, c-format
+msgid " [-D, --pgdata=]DATADIR data directory\n"
+msgstr " [-D, --pgdata=]DATADIR データディレクトリ\n"
+
+#: pg_checksums.c:80
+#, c-format
+msgid " -c, --check check data checksums (default)\n"
+msgstr " -c, --check データチェックサムを検証(デフォルト)\n"
+
+#: pg_checksums.c:81
+#, c-format
+msgid " -d, --disable disable data checksums\n"
+msgstr " -d, --disable データチェックサムを無効化\n"
+
+#: pg_checksums.c:82
+#, c-format
+msgid " -e, --enable enable data checksums\n"
+msgstr " -e, --enable データチェックサムを有効化\n"
+
+#: pg_checksums.c:83
+#, c-format
+msgid " -f, --filenode=FILENODE check only relation with specified filenode\n"
+msgstr " -f, --filenode=FILENODE 指定したファイルノードのリレーションのみ検証\n"
+
+#: pg_checksums.c:84
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync ディスクへの安全な書き込みを待機しない\n"
+
+#: pg_checksums.c:85
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress 進捗情報を表示\n"
+
+#: pg_checksums.c:86
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose 冗長メッセージを出力\n"
+
+#: pg_checksums.c:87
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version バージョン情報を表示して終了\n"
+
+#: pg_checksums.c:88
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help このヘルプを表示して終了\n"
+
+#: pg_checksums.c:89
+#, c-format
+msgid ""
+"\n"
+"If no data directory (DATADIR) is specified, the environment variable PGDATA\n"
+"is used.\n"
+"\n"
+msgstr ""
+"\n"
+"データディレクトリ(DATADIR)が指定されない場合、PGDATA環境変数が使用されます。\n"
+"\n"
+
+#: pg_checksums.c:91
+#, c-format
+msgid "Report bugs to <%s>.\n"
+msgstr "バグは<%s>に報告してください。\n"
+
+#: pg_checksums.c:92
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s ホームページ: <%s>\n"
+
+#: pg_checksums.c:161
+#, c-format
+msgid "%*s/%s MB (%d%%) computed"
+msgstr "%*s/%s MB (%d%%) 完了"
+
+#: pg_checksums.c:207
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "ファイル\"%s\"をオープンできませんでした: %m"
+
+#: pg_checksums.c:223
+#, c-format
+msgid "could not read block %u in file \"%s\": %m"
+msgstr "ファイル\"%2$s\"で%1$uブロックを読み取れませんでした: %3$m"
+
+#: pg_checksums.c:226
+#, c-format
+msgid "could not read block %u in file \"%s\": read %d of %d"
+msgstr " ファイル\"%2$s\"のブロック%1$uが読み込めませんでした: %4$d中%3$d読み込み済み"
+
+#: pg_checksums.c:250
+#, c-format
+msgid "checksum verification failed in file \"%s\", block %u: calculated checksum %X but block contains %X"
+msgstr "ファイル\"%s\" ブロック%uでチェックサム検証が失敗: 算出したチェックサムは%X 、しかしブロック上の値は%X"
+
+#: pg_checksums.c:265
+#, c-format
+msgid "seek failed for block %u in file \"%s\": %m"
+msgstr "ファイル\"%2$s\" ブロック%1$uへのシーク失敗: %3$m"
+
+#: pg_checksums.c:274
+#, c-format
+msgid "could not write block %u in file \"%s\": %m"
+msgstr "ファイル\"%2$s\"で%1$uブロックが書き出せませんでした: %3$m"
+
+#: pg_checksums.c:277
+#, c-format
+msgid "could not write block %u in file \"%s\": wrote %d of %d"
+msgstr "ファイル\"%2$s\"のブロック%1$uの書き込みに失敗しました: %4$dバイト中%3$dバイトのみ書き込みました"
+
+#: pg_checksums.c:290
+#, c-format
+msgid "checksums verified in file \"%s\""
+msgstr "ファイル\"%s\"のチェックサムは検証されました"
+
+#: pg_checksums.c:292
+#, c-format
+msgid "checksums enabled in file \"%s\""
+msgstr "ファイル\"%s\"のチェックサムは有効化されました"
+
+#: pg_checksums.c:317
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "ディレクトリ\"%s\"をオープンできませんでした: %m"
+
+#: pg_checksums.c:344 pg_checksums.c:423
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "ファイル\"%s\"のstatに失敗しました: %m"
+
+#: pg_checksums.c:371
+#, c-format
+msgid "invalid segment number %d in file name \"%s\""
+msgstr "ファイル名\"%2$s\"の不正なセグメント番号%1$d"
+
+#: pg_checksums.c:504
+#, c-format
+msgid "invalid filenode specification, must be numeric: %s"
+msgstr "不正なファイルノード指定、数値である必要があります: %s"
+
+#: pg_checksums.c:522 pg_checksums.c:538 pg_checksums.c:548 pg_checksums.c:557
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "詳細は\"%s --help\"で確認してください。\n"
+
+#: pg_checksums.c:537
+#, c-format
+msgid "no data directory specified"
+msgstr "データディレクトリが指定されていません"
+
+#: pg_checksums.c:546
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "コマンドライン引数が多すぎます (先頭は\"%s\")"
+
+#: pg_checksums.c:556
+#, c-format
+msgid "option -f/--filenode can only be used with --check"
+msgstr "オプション-f/--filenodeは--checkを指定したときのみ指定可能"
+
+#: pg_checksums.c:566
+#, c-format
+msgid "pg_control CRC value is incorrect"
+msgstr "pg_controlのCRC値が正しくありません"
+
+#: pg_checksums.c:572
+#, c-format
+msgid "cluster is not compatible with this version of pg_checksums"
+msgstr "クラスタはこのバージョンのpg_checksumsと互換性がありません"
+
+#: pg_checksums.c:578
+#, c-format
+msgid "database cluster is not compatible"
+msgstr "データベースクラスタが非互換です"
+
+#: pg_checksums.c:579
+#, c-format
+msgid "The database cluster was initialized with block size %u, but pg_checksums was compiled with block size %u.\n"
+msgstr "データベースクラスタはブロックサイズ%uで初期化されています、しかしpg_checksumsはブロックサイズ%uでコンパイルされています。\n"
+
+#: pg_checksums.c:592
+#, c-format
+msgid "cluster must be shut down"
+msgstr "クラスタはシャットダウンされていなければなりません"
+
+#: pg_checksums.c:599
+#, c-format
+msgid "data checksums are not enabled in cluster"
+msgstr "クラスタのデータチェックサムは有効になっていません"
+
+#: pg_checksums.c:606
+#, c-format
+msgid "data checksums are already disabled in cluster"
+msgstr "クラスタのデータチェックサムはすでに無効になっています"
+
+#: pg_checksums.c:613
+#, c-format
+msgid "data checksums are already enabled in cluster"
+msgstr "クラスタのデータチェックサムはすでに有効になっています"
+
+#: pg_checksums.c:639
+#, c-format
+msgid "Checksum operation completed\n"
+msgstr "チェックサム操作が完了しました\n"
+
+#: pg_checksums.c:640
+#, c-format
+msgid "Files scanned: %s\n"
+msgstr "スキャンしたファイル数: %s\n"
+
+#: pg_checksums.c:641
+#, c-format
+msgid "Blocks scanned: %s\n"
+msgstr "スキャンしたブロック数: %s\n"
+
+#: pg_checksums.c:644
+#, c-format
+msgid "Bad checksums: %s\n"
+msgstr "不正なチェックサム数: %s\n"
+
+#: pg_checksums.c:645 pg_checksums.c:672
+#, c-format
+msgid "Data checksum version: %u\n"
+msgstr "データチェックサムバージョン: %u\n"
+
+#: pg_checksums.c:664
+#, c-format
+msgid "syncing data directory"
+msgstr "データディレクトリを同期しています"
+
+#: pg_checksums.c:668
+#, c-format
+msgid "updating control file"
+msgstr "コントロールファイルを更新しています"
+
+#: pg_checksums.c:674
+#, c-format
+msgid "Checksums enabled in cluster\n"
+msgstr "クラスタのチェックサムが有効化されました\n"
+
+#: pg_checksums.c:676
+#, c-format
+msgid "Checksums disabled in cluster\n"
+msgstr "クラスタのチェックサムが無効化されました\n"
diff --git a/src/bin/pg_checksums/po/ko.po b/src/bin/pg_checksums/po/ko.po
new file mode 100644
index 0000000..ff767cf
--- /dev/null
+++ b/src/bin/pg_checksums/po/ko.po
@@ -0,0 +1,323 @@
+# LANGUAGE message translation file for pg_verify_checksums
+# Copyright (C) 2018 PostgreSQL Global Development Group
+# This file is distributed under the same license as the pg_verify_checksums (PostgreSQL) package.
+# Ioseph Kim <ioseph@uri.sarang.net>, 2018.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_checksums (PostgreSQL) 13\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-10-05 20:47+0000\n"
+"PO-Revision-Date: 2020-10-06 11:13+0900\n"
+"Last-Translator: Ioseph Kim <ioseph@uri.sarang.net>\n"
+"Language-Team: PostgreSQL Korea <kr@postgresql.org>\n"
+"Language: ko\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../../../src/common/logging.c:236
+#, c-format
+msgid "fatal: "
+msgstr "심각: "
+
+#: ../../../src/common/logging.c:243
+#, c-format
+msgid "error: "
+msgstr "오류: "
+
+#: ../../../src/common/logging.c:250
+#, c-format
+msgid "warning: "
+msgstr "경고: "
+
+#: pg_checksums.c:75
+#, c-format
+msgid ""
+"%s enables, disables, or verifies data checksums in a PostgreSQL database "
+"cluster.\n"
+"\n"
+msgstr ""
+"%s 명령은 PostgreSQL 데이터베이스 클러스터 내 자료 체크섬을 활성화 또는\n"
+"비활성화 또는 유효성 검사를 합니다.\n"
+"\n"
+
+#: pg_checksums.c:76
+#, c-format
+msgid "Usage:\n"
+msgstr "사용법:\n"
+
+#: pg_checksums.c:77
+#, c-format
+msgid " %s [OPTION]... [DATADIR]\n"
+msgstr " %s [옵션]... [DATADIR]\n"
+
+#: pg_checksums.c:78
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"옵션들:\n"
+
+#: pg_checksums.c:79
+#, c-format
+msgid " [-D, --pgdata=]DATADIR data directory\n"
+msgstr " [-D, --pgdata=]DATADIR 데이터 디렉터리\n"
+
+#: pg_checksums.c:80
+#, c-format
+msgid " -c, --check check data checksums (default)\n"
+msgstr " -c, --check 실 작업 없이, 그냥 검사만 (기본값)\n"
+
+#: pg_checksums.c:81
+#, c-format
+msgid " -d, --disable disable data checksums\n"
+msgstr " -d, --disable 자료 페이지 체크섬 비활성화\n"
+
+#: pg_checksums.c:82
+#, c-format
+msgid " -e, --enable enable data checksums\n"
+msgstr " -e, --enable 자료 페이지 체크섬 활성화\n"
+
+#: pg_checksums.c:83
+#, c-format
+msgid ""
+" -f, --filenode=FILENODE check only relation with specified filenode\n"
+msgstr " -f, --filenode=FILENODE 지정한 파일노드만 검사\n"
+
+#: pg_checksums.c:84
+#, c-format
+msgid ""
+" -N, --no-sync do not wait for changes to be written safely to "
+"disk\n"
+msgstr ""
+" -N, --no-sync 작업 완료 뒤 디스크 동기화 작업을 하지 않음\n"
+
+#: pg_checksums.c:85
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress 진행 과정 보여줌\n"
+
+#: pg_checksums.c:86
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose 자세한 작업 메시지 보여줌\n"
+
+#: pg_checksums.c:87
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version 버전 정보를 보여주고 마침\n"
+
+#: pg_checksums.c:88
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help 이 도움말을 보여주고 마침\n"
+
+#: pg_checksums.c:89
+#, c-format
+msgid ""
+"\n"
+"If no data directory (DATADIR) is specified, the environment variable "
+"PGDATA\n"
+"is used.\n"
+"\n"
+msgstr ""
+"\n"
+"DATADIR인 데이터 디렉터리를 지정하지 않으며, PGDATA 환경 변수값을\n"
+"사용합니다.\n"
+"\n"
+
+#: pg_checksums.c:91
+#, c-format
+msgid "Report bugs to <%s>.\n"
+msgstr "문제점 보고 주소: <%s>\n"
+
+#: pg_checksums.c:92
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s 홈페이지: <%s>\n"
+
+#: pg_checksums.c:161
+#, c-format
+msgid "%*s/%s MB (%d%%) computed"
+msgstr "%*s/%s MB (%d%%) 계산됨"
+
+#: pg_checksums.c:207
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "\"%s\" 파일을 열 수 없음: %m"
+
+#: pg_checksums.c:223
+#, c-format
+msgid "could not read block %u in file \"%s\": %m"
+msgstr "%u 블럭을 \"%s\" 파일에서 읽을 수 없음: %m"
+
+#: pg_checksums.c:226
+#, c-format
+msgid "could not read block %u in file \"%s\": read %d of %d"
+msgstr "%u 블럭을 \"%s\" 파일에서 읽을 수 없음: %d / %d 바이트만 읽음"
+
+#: pg_checksums.c:243
+#, c-format
+msgid ""
+"checksum verification failed in file \"%s\", block %u: calculated checksum "
+"%X but block contains %X"
+msgstr ""
+"\"%s\" 파일, %u 블럭의 체크섬 검사 실패: 계산된 체크섬은 %X 값이지만, 블럭에"
+"는 %X 값이 있음"
+
+#: pg_checksums.c:258
+#, c-format
+msgid "seek failed for block %u in file \"%s\": %m"
+msgstr "%u 블럭을 \"%s\" 파일에서 찾을 수 없음: %m"
+
+#: pg_checksums.c:267
+#, c-format
+msgid "could not write block %u in file \"%s\": %m"
+msgstr "%u 블럭을 \"%s\" 파일에 쓸 수 없음: %m"
+
+#: pg_checksums.c:270
+#, c-format
+msgid "could not write block %u in file \"%s\": wrote %d of %d"
+msgstr "%u 블럭을 \"%s\" 파일에 쓸 수 없음: %d / %d 바이트만 씀"
+
+#: pg_checksums.c:283
+#, c-format
+msgid "checksums verified in file \"%s\""
+msgstr "\"%s\" 파일 체크섬 검사 마침"
+
+#: pg_checksums.c:285
+#, c-format
+msgid "checksums enabled in file \"%s\""
+msgstr "\"%s\" 파일 체크섬 활성화 함"
+
+#: pg_checksums.c:310
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "\"%s\" 디렉터리 열 수 없음: %m"
+
+#: pg_checksums.c:337 pg_checksums.c:416
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "\"%s\" 파일의 상태값을 알 수 없음: %m"
+
+#: pg_checksums.c:364
+#, c-format
+msgid "invalid segment number %d in file name \"%s\""
+msgstr "잘못된 조각 번호 %d, 해당 파일: \"%s\""
+
+#: pg_checksums.c:497
+#, c-format
+msgid "invalid filenode specification, must be numeric: %s"
+msgstr "파일노드 값이 이상함. 이 값은 숫자여야 함: %s"
+
+#: pg_checksums.c:515 pg_checksums.c:531 pg_checksums.c:541 pg_checksums.c:550
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "자제한 사항은 \"%s --help\" 명령으로 살펴보십시오.\n"
+
+#: pg_checksums.c:530
+#, c-format
+msgid "no data directory specified"
+msgstr "데이터 디렉터리를 지정하지 않았음"
+
+#: pg_checksums.c:539
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "너무 많은 명령행 인수를 지정했음 (처음 \"%s\")"
+
+#: pg_checksums.c:549
+#, c-format
+msgid "option -f/--filenode can only be used with --check"
+msgstr "-f/--filenode 옵션은 --check 옵션만 사용할 수 있음"
+
+#: pg_checksums.c:559
+#, c-format
+msgid "pg_control CRC value is incorrect"
+msgstr "pg_control CRC 값이 잘못되었음"
+
+#: pg_checksums.c:565
+#, c-format
+msgid "cluster is not compatible with this version of pg_checksums"
+msgstr "해당 클러스터는 이 버전 pg_checksum과 호환되지 않음"
+
+#: pg_checksums.c:571
+#, c-format
+msgid "database cluster is not compatible"
+msgstr "데이터베이스 클러스터는 호환되지 않음"
+
+#: pg_checksums.c:572
+#, c-format
+msgid ""
+"The database cluster was initialized with block size %u, but pg_checksums "
+"was compiled with block size %u.\n"
+msgstr ""
+"이 데이터베이스 클러스터는 %u 블록 크기로 초기화 되었지만, pg_checksum은 %u "
+"블록 크기로 컴파일 되어있습니다.\n"
+
+#: pg_checksums.c:585
+#, c-format
+msgid "cluster must be shut down"
+msgstr "먼저 서버가 중지되어야 함"
+
+#: pg_checksums.c:592
+#, c-format
+msgid "data checksums are not enabled in cluster"
+msgstr "이 클러스터는 자료 체크섬이 비활성화 상태임"
+
+#: pg_checksums.c:599
+#, c-format
+msgid "data checksums are already disabled in cluster"
+msgstr "이 클러스터는 이미 자료 체크섬이 비활성화 상태임"
+
+#: pg_checksums.c:606
+#, c-format
+msgid "data checksums are already enabled in cluster"
+msgstr "이 클러스터는 이미 자료 체크섬이 활성화 상태임"
+
+#: pg_checksums.c:632
+#, c-format
+msgid "Checksum operation completed\n"
+msgstr "체크섬 작업 완료\n"
+
+#: pg_checksums.c:633
+#, c-format
+msgid "Files scanned: %s\n"
+msgstr "조사한 파일수: %s\n"
+
+#: pg_checksums.c:634
+#, c-format
+msgid "Blocks scanned: %s\n"
+msgstr "조사한 블럭수: %s\n"
+
+#: pg_checksums.c:637
+#, c-format
+msgid "Bad checksums: %s\n"
+msgstr "잘못된 체크섬: %s\n"
+
+#: pg_checksums.c:638 pg_checksums.c:665
+#, c-format
+msgid "Data checksum version: %d\n"
+msgstr "자료 체크섬 버전: %d\n"
+
+#: pg_checksums.c:657
+#, c-format
+msgid "syncing data directory"
+msgstr "데이터 디렉터리 fsync 중"
+
+#: pg_checksums.c:661
+#, c-format
+msgid "updating control file"
+msgstr "컨트롤 파일 바꾸는 중"
+
+#: pg_checksums.c:667
+#, c-format
+msgid "Checksums enabled in cluster\n"
+msgstr "이 클러스터는 자료 체크섬 옵션이 활성화 되었음\n"
+
+#: pg_checksums.c:669
+#, c-format
+msgid "Checksums disabled in cluster\n"
+msgstr "이 클러스터는 자료 체크섬 옵션이 비활성화 되었음\n"
diff --git a/src/bin/pg_checksums/po/ru.po b/src/bin/pg_checksums/po/ru.po
new file mode 100644
index 0000000..e15e2f7
--- /dev/null
+++ b/src/bin/pg_checksums/po/ru.po
@@ -0,0 +1,326 @@
+# Alexander Lakhin <a.lakhin@postgrespro.ru>, 2019, 2020, 2021.
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_verify_checksums (PostgreSQL) 11\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-08-14 06:29+0300\n"
+"PO-Revision-Date: 2021-02-08 07:59+0300\n"
+"Last-Translator: Alexander Lakhin <exclusion@gmail.com>\n"
+"Language-Team: Russian <pgsql-ru-general@postgresql.org>\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "важно: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "ошибка: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "предупреждение: "
+
+#: pg_checksums.c:75
+#, c-format
+msgid ""
+"%s enables, disables, or verifies data checksums in a PostgreSQL database "
+"cluster.\n"
+"\n"
+msgstr ""
+"%s включает, отключает, проверяет контрольные суммы данных в кластере БД "
+"PostgreSQL.\n"
+"\n"
+
+#: pg_checksums.c:76
+#, c-format
+msgid "Usage:\n"
+msgstr "Использование:\n"
+
+#: pg_checksums.c:77
+#, c-format
+msgid " %s [OPTION]... [DATADIR]\n"
+msgstr " %s [ПАРАМЕТР]... [КАТАЛОГ]\n"
+
+#: pg_checksums.c:78
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Параметры:\n"
+
+#: pg_checksums.c:79
+#, c-format
+msgid " [-D, --pgdata=]DATADIR data directory\n"
+msgstr " [-D, --pgdata=]КАТ_ДАННЫХ каталог данных\n"
+
+#: pg_checksums.c:80
+#, c-format
+msgid " -c, --check check data checksums (default)\n"
+msgstr ""
+" -c, --check проверить контрольные суммы данных (по "
+"умолчанию)\n"
+
+#: pg_checksums.c:81
+#, c-format
+msgid " -d, --disable disable data checksums\n"
+msgstr " -d, --disable отключить контрольные суммы\n"
+
+#: pg_checksums.c:82
+#, c-format
+msgid " -e, --enable enable data checksums\n"
+msgstr " -e, --enable включить контрольные суммы\n"
+
+#: pg_checksums.c:83
+#, c-format
+msgid ""
+" -f, --filenode=FILENODE check only relation with specified filenode\n"
+msgstr ""
+" -f, --filenode=ФАЙЛ_УЗЕЛ проверить только отношение с заданным файловым "
+"узлом\n"
+
+#: pg_checksums.c:84
+#, c-format
+msgid ""
+" -N, --no-sync do not wait for changes to be written safely to "
+"disk\n"
+msgstr ""
+" -N, --no-sync не ждать завершения сохранения данных на диске\n"
+
+#: pg_checksums.c:85
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress показывать прогресс операции\n"
+
+#: pg_checksums.c:86
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose выводить подробные сообщения\n"
+
+#: pg_checksums.c:87
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version показать версию и выйти\n"
+
+#: pg_checksums.c:88
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help показать эту справку и выйти\n"
+
+#: pg_checksums.c:89
+#, c-format
+msgid ""
+"\n"
+"If no data directory (DATADIR) is specified, the environment variable "
+"PGDATA\n"
+"is used.\n"
+"\n"
+msgstr ""
+"\n"
+"Если каталог данных (КАТ_ДАННЫХ) не задан, используется значение\n"
+"переменной окружения PGDATA.\n"
+"\n"
+
+#: pg_checksums.c:91
+#, c-format
+msgid "Report bugs to <%s>.\n"
+msgstr "Об ошибках сообщайте по адресу <%s>.\n"
+
+#: pg_checksums.c:92
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Домашняя страница %s: <%s>\n"
+
+#: pg_checksums.c:161
+#, c-format
+msgid "%*s/%s MB (%d%%) computed"
+msgstr "%*s/%s МБ (%d%%) обработано"
+
+#: pg_checksums.c:207
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "не удалось открыть файл \"%s\": %m"
+
+#: pg_checksums.c:223
+#, c-format
+msgid "could not read block %u in file \"%s\": %m"
+msgstr "не удалось прочитать блок %u в файле \"%s\": %m"
+
+#: pg_checksums.c:226
+#, c-format
+msgid "could not read block %u in file \"%s\": read %d of %d"
+msgstr "не удалось прочитать блок %u в файле \"%s\" (прочитано байт: %d из %d)"
+
+#: pg_checksums.c:250
+#, c-format
+msgid ""
+"checksum verification failed in file \"%s\", block %u: calculated checksum "
+"%X but block contains %X"
+msgstr ""
+"ошибка контрольных сумм в файле \"%s\", блоке %u: вычислена контрольная "
+"сумма %X, но блок содержит %X"
+
+#: pg_checksums.c:265
+#, c-format
+msgid "seek failed for block %u in file \"%s\": %m"
+msgstr "ошибка при переходе к блоку %u в файле \"%s\": %m"
+
+#: pg_checksums.c:274
+#, c-format
+msgid "could not write block %u in file \"%s\": %m"
+msgstr "не удалось записать блок %u в файл \"%s\": %m"
+
+#: pg_checksums.c:277
+#, c-format
+msgid "could not write block %u in file \"%s\": wrote %d of %d"
+msgstr "не удалось записать блок %u в файле \"%s\" (записано байт: %d из %d)"
+
+#: pg_checksums.c:290
+#, c-format
+msgid "checksums verified in file \"%s\""
+msgstr "контрольные суммы в файле \"%s\" проверены"
+
+#: pg_checksums.c:292
+#, c-format
+msgid "checksums enabled in file \"%s\""
+msgstr "контрольные суммы в файле \"%s\" включены"
+
+#: pg_checksums.c:317
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "не удалось открыть каталог \"%s\": %m"
+
+#: pg_checksums.c:344 pg_checksums.c:423
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "не удалось получить информацию о файле \"%s\": %m"
+
+#: pg_checksums.c:371
+#, c-format
+msgid "invalid segment number %d in file name \"%s\""
+msgstr "неверный номер сегмента %d в имени файла \"%s\""
+
+#: pg_checksums.c:504
+#, c-format
+msgid "invalid filenode specification, must be numeric: %s"
+msgstr "неверное указание файлового узла, требуется число: %s"
+
+#: pg_checksums.c:522 pg_checksums.c:538 pg_checksums.c:548 pg_checksums.c:557
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Для дополнительной информации попробуйте \"%s --help\".\n"
+
+#: pg_checksums.c:537
+#, c-format
+msgid "no data directory specified"
+msgstr "каталог данных не указан"
+
+#: pg_checksums.c:546
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "слишком много аргументов командной строки (первый: \"%s\")"
+
+#: pg_checksums.c:556
+#, c-format
+msgid "option -f/--filenode can only be used with --check"
+msgstr "параметр -f/--filenode можно использовать только с --check"
+
+#: pg_checksums.c:566
+#, c-format
+msgid "pg_control CRC value is incorrect"
+msgstr "ошибка контрольного значения в pg_control"
+
+#: pg_checksums.c:572
+#, c-format
+msgid "cluster is not compatible with this version of pg_checksums"
+msgstr "кластер несовместим с этой версией pg_checksums"
+
+#: pg_checksums.c:578
+#, c-format
+msgid "database cluster is not compatible"
+msgstr "несовместимый кластер баз данных"
+
+#: pg_checksums.c:579
+#, c-format
+msgid ""
+"The database cluster was initialized with block size %u, but pg_checksums "
+"was compiled with block size %u.\n"
+msgstr ""
+"Кластер баз данных был инициализирован с размером блока %u, а утилита "
+"pg_checksums скомпилирована для размера блока %u.\n"
+
+#: pg_checksums.c:592
+#, c-format
+msgid "cluster must be shut down"
+msgstr "кластер должен быть отключён"
+
+#: pg_checksums.c:599
+#, c-format
+msgid "data checksums are not enabled in cluster"
+msgstr "контрольные суммы в кластере не включены"
+
+#: pg_checksums.c:606
+#, c-format
+msgid "data checksums are already disabled in cluster"
+msgstr "контрольные суммы в кластере уже отключены"
+
+#: pg_checksums.c:613
+#, c-format
+msgid "data checksums are already enabled in cluster"
+msgstr "контрольные суммы в кластере уже включены"
+
+#: pg_checksums.c:639
+#, c-format
+msgid "Checksum operation completed\n"
+msgstr "Обработка контрольных сумм завершена\n"
+
+#: pg_checksums.c:640
+#, c-format
+msgid "Files scanned: %s\n"
+msgstr "Просканировано файлов: %s\n"
+
+#: pg_checksums.c:641
+#, c-format
+msgid "Blocks scanned: %s\n"
+msgstr "Просканировано блоков: %s\n"
+
+#: pg_checksums.c:644
+#, c-format
+msgid "Bad checksums: %s\n"
+msgstr "Неверные контрольные суммы: %s\n"
+
+#: pg_checksums.c:645 pg_checksums.c:672
+#, c-format
+msgid "Data checksum version: %u\n"
+msgstr "Версия контрольных сумм данных: %u\n"
+
+#: pg_checksums.c:664
+#, c-format
+msgid "syncing data directory"
+msgstr "синхронизация каталога данных"
+
+#: pg_checksums.c:668
+#, c-format
+msgid "updating control file"
+msgstr "модификация управляющего файла"
+
+#: pg_checksums.c:674
+#, c-format
+msgid "Checksums enabled in cluster\n"
+msgstr "Контрольные суммы в кластере включены\n"
+
+#: pg_checksums.c:676
+#, c-format
+msgid "Checksums disabled in cluster\n"
+msgstr "Контрольные суммы в кластере отключены\n"
+
+#~ msgid "Report bugs to <pgsql-bugs@lists.postgresql.org>.\n"
+#~ msgstr "Об ошибках сообщайте по адресу <pgsql-bugs@lists.postgresql.org>.\n"
diff --git a/src/bin/pg_checksums/po/sv.po b/src/bin/pg_checksums/po/sv.po
new file mode 100644
index 0000000..0f43a78
--- /dev/null
+++ b/src/bin/pg_checksums/po/sv.po
@@ -0,0 +1,309 @@
+# Swedish message translation file for pg_checksums
+# Copyright (C) 2019 PostgreSQL Global Development Group
+# This file is distributed under the same license as the pg_checksums (PostgreSQL) package.
+# Dennis Björklund <db@zigo.dhs.org>, 2019, 2020, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-11-06 22:18+0000\n"
+"PO-Revision-Date: 2021-11-07 06:44+0100\n"
+"Last-Translator: Dennis Björklund <db@zigo.dhs.org>\n"
+"Language-Team: Swedish <pgsql-translators@postgresql.org>\n"
+"Language: sv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "fatalt: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "fel: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "varning: "
+
+#: pg_checksums.c:75
+#, c-format
+msgid ""
+"%s enables, disables, or verifies data checksums in a PostgreSQL database cluster.\n"
+"\n"
+msgstr ""
+"%s slår på, slår av eller verifierar datakontrollsummor i ett PostgreSQL databaskluster.\n"
+"\n"
+
+#: pg_checksums.c:76
+#, c-format
+msgid "Usage:\n"
+msgstr "Användning:\n"
+
+#: pg_checksums.c:77
+#, c-format
+msgid " %s [OPTION]... [DATADIR]\n"
+msgstr " %s [FLAGGA]... [DATAKATALOG]\n"
+
+#: pg_checksums.c:78
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Flaggor:\n"
+
+#: pg_checksums.c:79
+#, c-format
+msgid " [-D, --pgdata=]DATADIR data directory\n"
+msgstr " [-D, --pgdata=]DATAKAT datakatalog\n"
+
+#: pg_checksums.c:80
+#, c-format
+msgid " -c, --check check data checksums (default)\n"
+msgstr " -c, --check kontrollera datakontrollsummor (standard)\n"
+
+#: pg_checksums.c:81
+#, c-format
+msgid " -d, --disable disable data checksums\n"
+msgstr " -d, --disable slå av datakontrollsummor\n"
+
+#: pg_checksums.c:82
+#, c-format
+msgid " -e, --enable enable data checksums\n"
+msgstr " -e, --enable slå på datakontrollsummor\n"
+
+#: pg_checksums.c:83
+#, c-format
+msgid " -f, --filenode=FILENODE check only relation with specified filenode\n"
+msgstr " -f, --filenode=FILNOD kontrollera bara relation med angiven filnod\n"
+
+#: pg_checksums.c:84
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync vänta inte på att ändingar säkert skrivits till disk\n"
+
+#: pg_checksums.c:85
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress visa förloppsinformation\n"
+
+#: pg_checksums.c:86
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose visa utförliga meddelanden\n"
+
+#: pg_checksums.c:87
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version visa versionsinformation, avsluta sedan\n"
+
+#: pg_checksums.c:88
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help visa denna hjälp, avsluta sedan\n"
+
+#: pg_checksums.c:89
+#, c-format
+msgid ""
+"\n"
+"If no data directory (DATADIR) is specified, the environment variable PGDATA\n"
+"is used.\n"
+"\n"
+msgstr ""
+"\n"
+"Om ingen datakatalog (DATAKATALOG) har angivits så nyttjas omgivningsvariabeln\n"
+"PGDATA för detta syfte.\n"
+"\n"
+
+#: pg_checksums.c:91
+#, c-format
+msgid "Report bugs to <%s>.\n"
+msgstr "Rapportera fel till <%s>.\n"
+
+#: pg_checksums.c:92
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "hemsida för %s: <%s>\n"
+
+#: pg_checksums.c:161
+#, c-format
+msgid "%*s/%s MB (%d%%) computed"
+msgstr "%*s/%s MB (%d%%) beräknad"
+
+#: pg_checksums.c:207
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "kunde inte öppna fil \"%s\": %m"
+
+#: pg_checksums.c:223
+#, c-format
+msgid "could not read block %u in file \"%s\": %m"
+msgstr "kunde inte läsa block %u i fil \"%s\": %m"
+
+#: pg_checksums.c:226
+#, c-format
+msgid "could not read block %u in file \"%s\": read %d of %d"
+msgstr "kunde inte läsa block %u i fil \"%s\": läste %d av %d"
+
+#: pg_checksums.c:250
+#, c-format
+msgid "checksum verification failed in file \"%s\", block %u: calculated checksum %X but block contains %X"
+msgstr "verifiering av kontrollsumma misslyckades i fil \"%s\", block %u: beräknad kontrollsumma är %X men blocket innehåller %X"
+
+#: pg_checksums.c:265
+#, c-format
+msgid "seek failed for block %u in file \"%s\": %m"
+msgstr "seek misslyckades för block %u i fil \"%s\": %m"
+
+#: pg_checksums.c:274
+#, c-format
+msgid "could not write block %u in file \"%s\": %m"
+msgstr "kunde inte skriva block %u i fil \"%s\": %m"
+
+#: pg_checksums.c:277
+#, c-format
+msgid "could not write block %u in file \"%s\": wrote %d of %d"
+msgstr "kunde inte skriva block %u i fil \"%s\": skrev %d av %d"
+
+#: pg_checksums.c:290
+#, c-format
+msgid "checksums verified in file \"%s\""
+msgstr "kontrollsummor verifierade i fil \"%s\""
+
+#: pg_checksums.c:292
+#, c-format
+msgid "checksums enabled in file \"%s\""
+msgstr "kontrollsummor påslagen i fil \"%s\""
+
+#: pg_checksums.c:317
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "kunde inte öppna katalog \"%s\": %m"
+
+#: pg_checksums.c:344 pg_checksums.c:423
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "kunde inte göra stat() på fil \"%s\": %m"
+
+#: pg_checksums.c:371
+#, c-format
+msgid "invalid segment number %d in file name \"%s\""
+msgstr "ogiltigt segmentnummer %d i filnamn \"%s\""
+
+#: pg_checksums.c:504
+#, c-format
+msgid "invalid filenode specification, must be numeric: %s"
+msgstr "ogiltigt angiven filnod, måste vara numerisk: %s"
+
+#: pg_checksums.c:522 pg_checksums.c:538 pg_checksums.c:548 pg_checksums.c:557
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Försök med \"%s --help\" för mer information.\n"
+
+#: pg_checksums.c:537
+#, c-format
+msgid "no data directory specified"
+msgstr "ingen datakatalog angiven"
+
+#: pg_checksums.c:546
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "för många kommandoradsargument (första är \"%s\")"
+
+#: pg_checksums.c:556
+#, c-format
+msgid "option -f/--filenode can only be used with --check"
+msgstr "inställningen -f/--filenode tillåts bara med --check"
+
+#: pg_checksums.c:566
+#, c-format
+msgid "pg_control CRC value is incorrect"
+msgstr "pg_control CRC-värde är inkorrekt"
+
+#: pg_checksums.c:572
+#, c-format
+msgid "cluster is not compatible with this version of pg_checksums"
+msgstr "klustret är inte kompatibelt med denna version av pg_checksums"
+
+#: pg_checksums.c:578
+#, c-format
+msgid "database cluster is not compatible"
+msgstr "databasklustret är inte kompatibelt"
+
+#: pg_checksums.c:579
+#, c-format
+msgid "The database cluster was initialized with block size %u, but pg_checksums was compiled with block size %u.\n"
+msgstr "Databasklustret initierades med blockstorlek %u men pg_checksums kompilerades med blockstorlek %u.\n"
+
+#: pg_checksums.c:592
+#, c-format
+msgid "cluster must be shut down"
+msgstr "klustret måste stängas ner"
+
+#: pg_checksums.c:599
+#, c-format
+msgid "data checksums are not enabled in cluster"
+msgstr "datakontrollsummor är inte påslaget i klustret"
+
+#: pg_checksums.c:606
+#, c-format
+msgid "data checksums are already disabled in cluster"
+msgstr "datakontrollsummor är redan avslaget i klustret"
+
+#: pg_checksums.c:613
+#, c-format
+msgid "data checksums are already enabled in cluster"
+msgstr "datakontrollsummor är redan påslagna i klustret"
+
+#: pg_checksums.c:639
+#, c-format
+msgid "Checksum operation completed\n"
+msgstr "Kontrollsummeoperation avslutad\n"
+
+#: pg_checksums.c:640
+#, c-format
+msgid "Files scanned: %s\n"
+msgstr "Skannade filer: %s\n"
+
+#: pg_checksums.c:641
+#, c-format
+msgid "Blocks scanned: %s\n"
+msgstr "Skannade block: %s\n"
+
+#: pg_checksums.c:644
+#, c-format
+msgid "Bad checksums: %s\n"
+msgstr "Felaktiga kontrollsummor: %s\n"
+
+#: pg_checksums.c:645 pg_checksums.c:672
+#, c-format
+msgid "Data checksum version: %u\n"
+msgstr "Datakontrollsummeversion: %u\n"
+
+#: pg_checksums.c:664
+#, c-format
+msgid "syncing data directory"
+msgstr "synkar datakatalogen"
+
+#: pg_checksums.c:668
+#, c-format
+msgid "updating control file"
+msgstr "uppdaterar kontrollfil"
+
+#: pg_checksums.c:674
+#, c-format
+msgid "Checksums enabled in cluster\n"
+msgstr "Kontrollsummor påslaget i klustret\n"
+
+#: pg_checksums.c:676
+#, c-format
+msgid "Checksums disabled in cluster\n"
+msgstr "Kontrollsummor avslaget i klustret\n"
diff --git a/src/bin/pg_checksums/po/tr.po b/src/bin/pg_checksums/po/tr.po
new file mode 100644
index 0000000..3bd40db
--- /dev/null
+++ b/src/bin/pg_checksums/po/tr.po
@@ -0,0 +1,304 @@
+# LANGUAGE message translation file for pg_checksums
+# Copyright (C) 2019 PostgreSQL Global Development Group
+# This file is distributed under the same license as the pg_checksums (PostgreSQL) package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
+# Abdullah GÜLNER <agulner@gmail.com>, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_checksums (PostgreSQL) 12\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2019-06-17 07:45+0000\n"
+"PO-Revision-Date: 2019-06-17 14:27+0300\n"
+"Last-Translator: Abdullah GÜLNER\n"
+"Language-Team: \n"
+"Language: tr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.8.7.1\n"
+
+#: ../../../src/common/logging.c:188
+#, c-format
+msgid "fatal: "
+msgstr "ölümcül (fatal): "
+
+#: ../../../src/common/logging.c:195
+#, c-format
+msgid "error: "
+msgstr "hata (error): "
+
+#: ../../../src/common/logging.c:202
+#, c-format
+msgid "warning: "
+msgstr "uyarı: "
+
+#: pg_checksums.c:75
+#, c-format
+msgid ""
+"%s enables, disables or verifies data checksums in a PostgreSQL database cluster.\n"
+"\n"
+msgstr ""
+"%s bir PostgreSQL veritabanı kümesinde, veri sağlama toplamlarını etkinleştirir, devre dışı bırakır veya doğrulamasını yapar.\n"
+"\n"
+
+#: pg_checksums.c:76
+#, c-format
+msgid "Usage:\n"
+msgstr "Kullanımı:\n"
+
+#: pg_checksums.c:77
+#, c-format
+msgid " %s [OPTION]... [DATADIR]\n"
+msgstr " %s [SEÇENEK]... [DATADIR]\n"
+
+#: pg_checksums.c:78
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Seçenekler:\n"
+
+#: pg_checksums.c:79
+#, c-format
+msgid " [-D, --pgdata=]DATADIR data directory\n"
+msgstr " [-D, --pgdata=]DATADIR veri dizini\n"
+
+#: pg_checksums.c:80
+#, c-format
+msgid " -c, --check check data checksums (default)\n"
+msgstr " -c, --check veri sağlama toplamlarını denetle (varsayılan)\n"
+
+#: pg_checksums.c:81
+#, c-format
+msgid " -d, --disable disable data checksums\n"
+msgstr " -d, --disable veri sağlama toplamlarını devre dışı bırak\n"
+
+#: pg_checksums.c:82
+#, c-format
+msgid " -e, --enable enable data checksums\n"
+msgstr " -e, --enable veri sağlama toplamlarını etkinleştir\n"
+
+#: pg_checksums.c:83
+#, c-format
+msgid " -f, --filenode=FILENODE check only relation with specified filenode\n"
+msgstr " -f, --filenode=FILENODE sadece belirtilen filenode'lu nesneyi denetle\n"
+
+#: pg_checksums.c:84
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync değişikliklerin diske yazılmasını bekleme\n"
+
+#: pg_checksums.c:85
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress ilerleme bilgisini göster\n"
+
+#: pg_checksums.c:86
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose detaylı (verbose) mesajlar göster\n"
+
+#: pg_checksums.c:87
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version sürüm bilgisini gösterir ve sonra çıkar\n"
+
+#: pg_checksums.c:88
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help bu yardımı gösterir ve sonra çıkar\n"
+
+#: pg_checksums.c:89
+#, c-format
+msgid ""
+"\n"
+"If no data directory (DATADIR) is specified, the environment variable PGDATA\n"
+"is used.\n"
+"\n"
+msgstr ""
+"\n"
+"Eğer hiçbir veri dizini (DATADIR) belirtilmezse, PGDATA çevresel değişkeni\n"
+"kullanılır.\n"
+"\n"
+
+#: pg_checksums.c:91
+#, c-format
+msgid "Report bugs to <pgsql-bugs@lists.postgresql.org>.\n"
+msgstr "Hataları <pgsql-bugs@lists.postgresql.org> adresine bildirebilirsiniz.\n"
+
+#: pg_checksums.c:149
+#, c-format
+msgid "%*s/%s MB (%d%%) computed"
+msgstr "%*s/%s MB (%d%%) hesaplandı"
+
+#: pg_checksums.c:186
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "\"%s\" dosyası açılamıyor: %m"
+
+#: pg_checksums.c:201
+#, c-format
+msgid "could not read block %u in file \"%s\": read %d of %d"
+msgstr "\"%2$s\" dosyasında %1$u bloğu okunamadı: %4$d nin %3$d si okundu"
+
+#: pg_checksums.c:218
+#, c-format
+msgid "checksum verification failed in file \"%s\", block %u: calculated checksum %X but block contains %X"
+msgstr "\"%s\" dosyasında sağlama toplamı doğrulaması başarısız oldu, blok %u: %X sağlama toplamı hesaplandı fakat blok %X içeriyor"
+
+#: pg_checksums.c:231
+#, c-format
+msgid "seek failed for block %u in file \"%s\": %m"
+msgstr "\"%2$s\" dosyasında %1$u bloğu için arama (seek) başarısız oldu: %3$m"
+
+#: pg_checksums.c:238
+#, c-format
+msgid "could not update checksum of block %u in file \"%s\": %m"
+msgstr "\"%2$s\" dosyasında %1$u bloğu güncellenemedi: %3$m"
+
+#: pg_checksums.c:251
+#, c-format
+msgid "checksums verified in file \"%s\""
+msgstr "\"%s\" dosyasında sağlama toplamları doğrulandı"
+
+#: pg_checksums.c:253
+#, c-format
+msgid "checksums enabled in file \"%s\""
+msgstr "\"%s\" dosyasında sağlama toplamları etkinleştirildi"
+
+#: pg_checksums.c:278
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "\"%s\" dizini açılamıyor: %m"
+
+#: pg_checksums.c:305
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "\"%s\" dosyası durumlanamadı: %m"
+
+#: pg_checksums.c:332
+#, c-format
+msgid "invalid segment number %d in file name \"%s\""
+msgstr "\"%2$s\" dosyasında geçersiz segment numarası %1$d"
+
+#: pg_checksums.c:420
+#, c-format
+msgid "invalid filenode specification, must be numeric: %s"
+msgstr "geçersiz filenode tanımlaması, sayısal olmalı: %s"
+
+#: pg_checksums.c:438 pg_checksums.c:454 pg_checksums.c:464 pg_checksums.c:473
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Daha fazla bilgi için \"%s --help\" yazın\n"
+
+#: pg_checksums.c:453
+#, c-format
+msgid "no data directory specified"
+msgstr "hiçbir veri dizini belirtilmemiş"
+
+#: pg_checksums.c:462
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "çok fazla komut satırı argümanı (ilki \"%s\")"
+
+#: pg_checksums.c:472
+#, c-format
+msgid "--filenode option only possible with --check"
+msgstr "--filenode seçeneği sadece --check ile kullanılabilir"
+
+#: pg_checksums.c:482
+#, c-format
+msgid "pg_control CRC value is incorrect"
+msgstr "pg_control CRC değeri yanlış"
+
+#: pg_checksums.c:488
+#, c-format
+msgid "cluster is not compatible with this version of pg_checksums"
+msgstr "küme (cluster), pg_verify_checksums'ın bu sürümüyle uyumlu değil"
+
+#: pg_checksums.c:494
+#, c-format
+msgid "database cluster is not compatible"
+msgstr "veritabanı kümesi uyumlu değil"
+
+#: pg_checksums.c:495
+#, c-format
+msgid "The database cluster was initialized with block size %u, but pg_checksums was compiled with block size %u.\n"
+msgstr "Veritabanı kümesi (cluster) %u blok boyutu ile ilklendirilmiştir, ancak pg_checksums %u blok boyutu ile derlenmiştir.\n"
+
+#: pg_checksums.c:508
+#, c-format
+msgid "cluster must be shut down"
+msgstr "küme (cluster) kapatılmalı"
+
+#: pg_checksums.c:515
+#, c-format
+msgid "data checksums are not enabled in cluster"
+msgstr "kümede (cluster) veri sağlama toplamaları etkinleştirilmemiş"
+
+#: pg_checksums.c:522
+#, c-format
+msgid "data checksums are already disabled in cluster"
+msgstr "kümede (cluster) veri sağlama toplamları zaten devre dışı bırakılmış"
+
+#: pg_checksums.c:529
+#, c-format
+msgid "data checksums are already enabled in cluster"
+msgstr "kümede (cluster) veri sağlama toplamları zaten etkinleştirilmiş"
+
+#: pg_checksums.c:558
+#, c-format
+msgid "Checksum operation completed\n"
+msgstr "Sağlama toplamı işlemi tamamlandı\n"
+
+#: pg_checksums.c:559
+#, c-format
+msgid "Files scanned: %s\n"
+msgstr "Taranan dosyalar: %s\n"
+
+#: pg_checksums.c:560
+#, c-format
+msgid "Blocks scanned: %s\n"
+msgstr "Taranan bloklar: %s\n"
+
+#: pg_checksums.c:563
+#, c-format
+msgid "Bad checksums: %s\n"
+msgstr "Yanlış sağlama toplamları: %s\n"
+
+#: pg_checksums.c:564 pg_checksums.c:591
+#, c-format
+msgid "Data checksum version: %d\n"
+msgstr "Veri sağlama toplamı sürümü: %d\n"
+
+#: pg_checksums.c:583
+#, c-format
+msgid "syncing data directory"
+msgstr "veri dizini senkronize ediliyor"
+
+#: pg_checksums.c:587
+#, c-format
+msgid "updating control file"
+msgstr "kontrol dosyası güncelleniyor"
+
+#: pg_checksums.c:593
+#, c-format
+msgid "Checksums enabled in cluster\n"
+msgstr "Kümede sağlama toplamları etkinleştirildi\n"
+
+#: pg_checksums.c:595
+#, c-format
+msgid "Checksums disabled in cluster\n"
+msgstr "Kümede sağlama toplamları devre dışı bırakıldı\n"
+
+#~ msgid " -?, --help show this help, then exit\n"
+#~ msgstr " -?, --help bu yardımı göster, sonra çık\n"
+
+#~ msgid " -V, --version output version information, then exit\n"
+#~ msgstr " -V, --version sürüm bilgisini göster, sonra çık\n"
+
+#~ msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+#~ msgstr " -N, --no-sync değişikliklerin diske yazılmasını bekleme\n"
diff --git a/src/bin/pg_checksums/po/uk.po b/src/bin/pg_checksums/po/uk.po
new file mode 100644
index 0000000..a70ea14
--- /dev/null
+++ b/src/bin/pg_checksums/po/uk.po
@@ -0,0 +1,299 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: postgresql\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-03-16 09:19+0000\n"
+"PO-Revision-Date: 2022-06-19 10:10\n"
+"Last-Translator: \n"
+"Language-Team: Ukrainian\n"
+"Language: uk_UA\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n"
+"X-Crowdin-Project: postgresql\n"
+"X-Crowdin-Project-ID: 324573\n"
+"X-Crowdin-Language: uk\n"
+"X-Crowdin-File: /REL_14_STABLE/pg_checksums.pot\n"
+"X-Crowdin-File-ID: 764\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "збій: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "помилка: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "попередження: "
+
+#: pg_checksums.c:75
+#, c-format
+msgid "%s enables, disables, or verifies data checksums in a PostgreSQL database cluster.\n\n"
+msgstr "%s активує, деактивує або перевіряє контрольні суми даних в кластері бази даних PostgreSQL.\n\n"
+
+#: pg_checksums.c:76
+#, c-format
+msgid "Usage:\n"
+msgstr "Використання:\n"
+
+#: pg_checksums.c:77
+#, c-format
+msgid " %s [OPTION]... [DATADIR]\n"
+msgstr " %s [OPTION]... [DATADIR]\n"
+
+#: pg_checksums.c:78
+#, c-format
+msgid "\n"
+"Options:\n"
+msgstr "\n"
+"Параметри:\n"
+
+#: pg_checksums.c:79
+#, c-format
+msgid " [-D, --pgdata=]DATADIR data directory\n"
+msgstr " [-D, --pgdata=]DATADIR каталог даних\n"
+
+#: pg_checksums.c:80
+#, c-format
+msgid " -c, --check check data checksums (default)\n"
+msgstr " -c, --check перевірити контрольні суми даних (за замовчуванням)\n"
+
+#: pg_checksums.c:81
+#, c-format
+msgid " -d, --disable disable data checksums\n"
+msgstr " -d, --disable вимкнути контрольні суми даних\n"
+
+#: pg_checksums.c:82
+#, c-format
+msgid " -e, --enable enable data checksums\n"
+msgstr " -e, --enable активувати контрольні суми даних\n"
+
+#: pg_checksums.c:83
+#, c-format
+msgid " -f, --filenode=FILENODE check only relation with specified filenode\n"
+msgstr " -f, --filenode=FILENODE перевіряти відношення лише із вказаним файлом\n"
+
+#: pg_checksums.c:84
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync не чекати на безпечний запис змін на диск\n"
+
+#: pg_checksums.c:85
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress показати інформацію про прогрес\n"
+
+#: pg_checksums.c:86
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose виводити детальні повідомлення\n"
+
+#: pg_checksums.c:87
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version вивести інформацію про версію, потім вийти\n"
+
+#: pg_checksums.c:88
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help показати цю довідку, потім вийти\n"
+
+#: pg_checksums.c:89
+#, c-format
+msgid "\n"
+"If no data directory (DATADIR) is specified, the environment variable PGDATA\n"
+"is used.\n\n"
+msgstr "\n"
+"Якщо каталог даних не вказано (DATADIR), використовується змінна середовища PGDATA.\n\n"
+
+#: pg_checksums.c:91
+#, c-format
+msgid "Report bugs to <%s>.\n"
+msgstr "Повідомляти про помилки на <%s>.\n"
+
+#: pg_checksums.c:92
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Домашня сторінка %s: <%s>\n"
+
+#: pg_checksums.c:161
+#, c-format
+msgid "%*s/%s MB (%d%%) computed"
+msgstr "%*s/%s MB (%d%%) обчислено"
+
+#: pg_checksums.c:207
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "не можливо відкрити файл \"%s\": %m"
+
+#: pg_checksums.c:223
+#, c-format
+msgid "could not read block %u in file \"%s\": %m"
+msgstr "не вдалося прочитати блок %u в файлі \"%s\": %m"
+
+#: pg_checksums.c:226
+#, c-format
+msgid "could not read block %u in file \"%s\": read %d of %d"
+msgstr "не вдалося прочитати блок %u у файлі \"%s\": прочитано %d з %d"
+
+#: pg_checksums.c:250
+#, c-format
+msgid "checksum verification failed in file \"%s\", block %u: calculated checksum %X but block contains %X"
+msgstr "помилка перевірки контрольних сум у файлі \"%s\", блок %u: обчислена контрольна сума %X, але блок містить %X"
+
+#: pg_checksums.c:265
+#, c-format
+msgid "seek failed for block %u in file \"%s\": %m"
+msgstr "помилка пошуку для блоку %u у файлі \"%s\": %m"
+
+#: pg_checksums.c:274
+#, c-format
+msgid "could not write block %u in file \"%s\": %m"
+msgstr "не вдалося записати блок %u у файл \"%s\": %m"
+
+#: pg_checksums.c:277
+#, c-format
+msgid "could not write block %u in file \"%s\": wrote %d of %d"
+msgstr "не вдалося записати блок %u у файлі \"%s\": записано %d з %d"
+
+#: pg_checksums.c:290
+#, c-format
+msgid "checksums verified in file \"%s\""
+msgstr "контрольні суми у файлі \"%s\" перевірені"
+
+#: pg_checksums.c:292
+#, c-format
+msgid "checksums enabled in file \"%s\""
+msgstr "контрольні суми у файлі \"%s\" активовані"
+
+#: pg_checksums.c:317
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "не вдалося відкрити каталог \"%s\": %m"
+
+#: pg_checksums.c:344 pg_checksums.c:423
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "не вдалося отримати інформацію від файлу \"%s\": %m"
+
+#: pg_checksums.c:371
+#, c-format
+msgid "invalid segment number %d in file name \"%s\""
+msgstr "неприпустимий номер сегменту %d в імені файлу \"%s\""
+
+#: pg_checksums.c:504
+#, c-format
+msgid "invalid filenode specification, must be numeric: %s"
+msgstr "неприпустима специфікація filenode, повинна бути числовою: %s"
+
+#: pg_checksums.c:522 pg_checksums.c:538 pg_checksums.c:548 pg_checksums.c:557
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Спробуйте \"%s --help\" для додаткової інформації.\n"
+
+#: pg_checksums.c:537
+#, c-format
+msgid "no data directory specified"
+msgstr "каталог даних не вказано"
+
+#: pg_checksums.c:546
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "забагато аргументів у командному рядку (перший \"%s\")"
+
+#: pg_checksums.c:556
+#, c-format
+msgid "option -f/--filenode can only be used with --check"
+msgstr "параметр -f/--filenode може бути використаний тільки з --check"
+
+#: pg_checksums.c:566
+#, c-format
+msgid "pg_control CRC value is incorrect"
+msgstr "значення CRC pg_control неправильне"
+
+#: pg_checksums.c:572
+#, c-format
+msgid "cluster is not compatible with this version of pg_checksums"
+msgstr "кластер не сумісний з цією версією pg_checksum"
+
+#: pg_checksums.c:578
+#, c-format
+msgid "database cluster is not compatible"
+msgstr "кластер бази даних не сумісний"
+
+#: pg_checksums.c:579
+#, c-format
+msgid "The database cluster was initialized with block size %u, but pg_checksums was compiled with block size %u.\n"
+msgstr "Кластер бази даних було ініціалізовано з розміром блоку %u, але pg_checksums було скомпільовано з розміром блоку %u.\n"
+
+#: pg_checksums.c:592
+#, c-format
+msgid "cluster must be shut down"
+msgstr "кластер повинен бути закритий"
+
+#: pg_checksums.c:599
+#, c-format
+msgid "data checksums are not enabled in cluster"
+msgstr "контрольні суми в кластері неактивовані"
+
+#: pg_checksums.c:606
+#, c-format
+msgid "data checksums are already disabled in cluster"
+msgstr "контрольні суми вже неактивовані в кластері"
+
+#: pg_checksums.c:613
+#, c-format
+msgid "data checksums are already enabled in cluster"
+msgstr "контрольні суми вже активовані в кластері"
+
+#: pg_checksums.c:639
+#, c-format
+msgid "Checksum operation completed\n"
+msgstr "Операція контрольної суми завершена\n"
+
+#: pg_checksums.c:640
+#, c-format
+msgid "Files scanned: %s\n"
+msgstr "Файлів відскановано: %s\n"
+
+#: pg_checksums.c:641
+#, c-format
+msgid "Blocks scanned: %s\n"
+msgstr "Блоків відскановано: %s\n"
+
+#: pg_checksums.c:644
+#, c-format
+msgid "Bad checksums: %s\n"
+msgstr "Неправильні контрольні суми: %s\n"
+
+#: pg_checksums.c:645 pg_checksums.c:672
+#, c-format
+msgid "Data checksum version: %u\n"
+msgstr "Версія контрольних сум даних: %u\n"
+
+#: pg_checksums.c:664
+#, c-format
+msgid "syncing data directory"
+msgstr "синхронізація даних каталогу"
+
+#: pg_checksums.c:668
+#, c-format
+msgid "updating control file"
+msgstr "оновлення контрольного файлу"
+
+#: pg_checksums.c:674
+#, c-format
+msgid "Checksums enabled in cluster\n"
+msgstr "Контрольні суми активовані в кластері\n"
+
+#: pg_checksums.c:676
+#, c-format
+msgid "Checksums disabled in cluster\n"
+msgstr "Контрольні суми вимкнені у кластері\n"
+
diff --git a/src/bin/pg_checksums/po/zh_CN.po b/src/bin/pg_checksums/po/zh_CN.po
new file mode 100644
index 0000000..3da7c46
--- /dev/null
+++ b/src/bin/pg_checksums/po/zh_CN.po
@@ -0,0 +1,307 @@
+# LANGUAGE message translation file for pg_checksums
+# Copyright (C) 2020 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# FIRST AUTHOR <zhangjie2@fujitsu.com>, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_checksums (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-08-14 05:49+0000\n"
+"PO-Revision-Date: 2021-08-14 16:00+0800\n"
+"Last-Translator: Jie Zhang <zhangjie2@fujitsu.com>\n"
+"Language-Team: Chinese (Simplified) <zhangjie2@fujitsu.com>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "致命的: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "错误: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "警告: "
+
+#: pg_checksums.c:75
+#, c-format
+msgid ""
+"%s enables, disables, or verifies data checksums in a PostgreSQL database cluster.\n"
+"\n"
+msgstr ""
+"%s启用、禁用或验证PostgreSQL数据库群集中的数据校验和.\n"
+"\n"
+
+#: pg_checksums.c:76
+#, c-format
+msgid "Usage:\n"
+msgstr "使用方法:\n"
+
+#: pg_checksums.c:77
+#, c-format
+msgid " %s [OPTION]... [DATADIR]\n"
+msgstr " %s [选项]... [DATADIR]\n"
+
+#: pg_checksums.c:78
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"选项:\n"
+
+#: pg_checksums.c:79
+#, c-format
+msgid " [-D, --pgdata=]DATADIR data directory\n"
+msgstr " [-D, --pgdata=]DATADIR 数据目录\n"
+
+#: pg_checksums.c:80
+#, c-format
+msgid " -c, --check check data checksums (default)\n"
+msgstr " -c, --check 检查数据校验和(默认)\n"
+
+#: pg_checksums.c:81
+#, c-format
+msgid " -d, --disable disable data checksums\n"
+msgstr " -d, --disable 禁用数据校验和\n"
+
+#: pg_checksums.c:82
+#, c-format
+msgid " -e, --enable enable data checksums\n"
+msgstr " -e, --enable 启用数据校验和\n"
+
+#: pg_checksums.c:83
+#, c-format
+msgid " -f, --filenode=FILENODE check only relation with specified filenode\n"
+msgstr " -f, --filenode=FILENODE 仅检查与指定filenode的关系\n"
+
+#: pg_checksums.c:84
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync 不用等待变化安全写入磁盘\n"
+
+#: pg_checksums.c:85
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress 显示进度信息\n"
+
+#: pg_checksums.c:86
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose 输出详细的消息\n"
+
+#: pg_checksums.c:87
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version 输出版本信息, 然后退出\n"
+
+#: pg_checksums.c:88
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help 显示此帮助, 然后退出\n"
+
+#: pg_checksums.c:89
+#, c-format
+msgid ""
+"\n"
+"If no data directory (DATADIR) is specified, the environment variable PGDATA\n"
+"is used.\n"
+"\n"
+msgstr ""
+"\n"
+"如果没有指定数据目录(DATADIR), 将使用\n"
+"环境变量PGDATA.\n"
+"\n"
+
+#: pg_checksums.c:91
+#, c-format
+msgid "Report bugs to <%s>.\n"
+msgstr "臭虫报告至<%s>.\n"
+
+#: pg_checksums.c:92
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s 主页: <%s>\n"
+
+#: pg_checksums.c:161
+#, c-format
+msgid "%*s/%s MB (%d%%) computed"
+msgstr "已计算%*s/%s MB (%d%%)"
+
+#: pg_checksums.c:207
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "无法打开文件 \"%s\": %m"
+
+#: pg_checksums.c:223
+#, c-format
+msgid "could not read block %u in file \"%s\": %m"
+msgstr "无法在文件\"%2$s\"中读取块%1$u: %3$m"
+
+#: pg_checksums.c:226
+#, c-format
+msgid "could not read block %u in file \"%s\": read %d of %d"
+msgstr "无法读取文件\"%2$s\"中的块%1$u:读取第%3$d个,共%4$d个"
+
+#: pg_checksums.c:250
+#, c-format
+msgid "checksum verification failed in file \"%s\", block %u: calculated checksum %X but block contains %X"
+msgstr "校验和验证在文件\"%s\"中失败,块%u:计算的校验和 %X ,但块包含 %X"
+
+#: pg_checksums.c:265
+#, c-format
+msgid "seek failed for block %u in file \"%s\": %m"
+msgstr "在文件\"%2$s\"中查找块%1$u失败: %3$m"
+
+#: pg_checksums.c:274
+#, c-format
+msgid "could not write block %u in file \"%s\": %m"
+msgstr "无法在文件 \"%2$s\"中写入块%1$u: %3$m"
+
+#: pg_checksums.c:277
+#, c-format
+msgid "could not write block %u in file \"%s\": wrote %d of %d"
+msgstr "无法对文件\"%2$s\"写操作数据块%1$u: 已写入%3$d个,共%4$d个"
+
+#: pg_checksums.c:290
+#, c-format
+msgid "checksums verified in file \"%s\""
+msgstr "在文件\"%s\"中验证的校验和"
+
+#: pg_checksums.c:292
+#, c-format
+msgid "checksums enabled in file \"%s\""
+msgstr "文件\"%s\"中启用的校验和"
+
+#: pg_checksums.c:317
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "无法打开目录 \"%s\": %m"
+
+#: pg_checksums.c:344 pg_checksums.c:423
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "无法取文件 \"%s\" 的状态: %m"
+
+#: pg_checksums.c:371
+#, c-format
+msgid "invalid segment number %d in file name \"%s\""
+msgstr "文件名\"%2$s\"中的无效段号%1$d"
+
+#: pg_checksums.c:504
+#, c-format
+msgid "invalid filenode specification, must be numeric: %s"
+msgstr "filenode指定无效,必须是数字: %s"
+
+#: pg_checksums.c:522 pg_checksums.c:538 pg_checksums.c:548 pg_checksums.c:557
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "请用 \"%s --help\" 获取更多的信息.\n"
+
+#: pg_checksums.c:537
+#, c-format
+msgid "no data directory specified"
+msgstr "没有指定数据目录"
+
+#: pg_checksums.c:546
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "命令行参数太多 (第一个是 \"%s\")"
+
+#: pg_checksums.c:556
+#, c-format
+msgid "option -f/--filenode can only be used with --check"
+msgstr " -f/--filenode选项只能与--check一起使用"
+
+#: pg_checksums.c:566
+#, c-format
+msgid "pg_control CRC value is incorrect"
+msgstr "pg_control的CRC值不正确 "
+
+#: pg_checksums.c:572
+#, c-format
+msgid "cluster is not compatible with this version of pg_checksums"
+msgstr "群集与此版本的pg_checksums不兼容”"
+
+#: pg_checksums.c:578
+#, c-format
+msgid "database cluster is not compatible"
+msgstr "数据库群集不兼容"
+
+#: pg_checksums.c:579
+#, c-format
+msgid "The database cluster was initialized with block size %u, but pg_checksums was compiled with block size %u.\n"
+msgstr "数据库群集是用块大小%u初始化的,但pg_checksums是用块大小%u编译的.\n"
+
+#: pg_checksums.c:592
+#, c-format
+msgid "cluster must be shut down"
+msgstr "必须关闭群集"
+
+#: pg_checksums.c:599
+#, c-format
+msgid "data checksums are not enabled in cluster"
+msgstr "群集中未启用数据校验和"
+
+#: pg_checksums.c:606
+#, c-format
+msgid "data checksums are already disabled in cluster"
+msgstr "群集中已禁用数据校验和"
+
+#: pg_checksums.c:613
+#, c-format
+msgid "data checksums are already enabled in cluster"
+msgstr "群集中已启用数据校验和"
+
+#: pg_checksums.c:639
+#, c-format
+msgid "Checksum operation completed\n"
+msgstr "校验和操作已完成\n"
+
+#: pg_checksums.c:640
+#, c-format
+msgid "Files scanned: %s\n"
+msgstr "扫描的文件: %s\n"
+
+#: pg_checksums.c:641
+#, c-format
+msgid "Blocks scanned: %s\n"
+msgstr "扫描的块: %s\n"
+
+#: pg_checksums.c:644
+#, c-format
+msgid "Bad checksums: %s\n"
+msgstr "坏校验和: %s\n"
+
+#: pg_checksums.c:645 pg_checksums.c:672
+msgid "Data checksum version: %u\n"
+msgstr "数据校验和版本: %u\n"
+
+#: pg_checksums.c:664
+#, c-format
+msgid "syncing data directory"
+msgstr "同步数据目录"
+
+#: pg_checksums.c:668
+#, c-format
+msgid "updating control file"
+msgstr "正在更新控制文件"
+
+#: pg_checksums.c:674
+#, c-format
+msgid "Checksums enabled in cluster\n"
+msgstr "群集中启用的校验和\n"
+
+#: pg_checksums.c:676
+#, c-format
+msgid "Checksums disabled in cluster\n"
+msgstr "在群集中禁用校验和\n"
diff --git a/src/bin/pg_checksums/t/001_basic.pl b/src/bin/pg_checksums/t/001_basic.pl
new file mode 100644
index 0000000..62e78a5
--- /dev/null
+++ b/src/bin/pg_checksums/t/001_basic.pl
@@ -0,0 +1,11 @@
+
+# Copyright (c) 2021, PostgreSQL Global Development Group
+
+use strict;
+use warnings;
+use TestLib;
+use Test::More tests => 8;
+
+program_help_ok('pg_checksums');
+program_version_ok('pg_checksums');
+program_options_handling_ok('pg_checksums');
diff --git a/src/bin/pg_checksums/t/002_actions.pl b/src/bin/pg_checksums/t/002_actions.pl
new file mode 100644
index 0000000..761f7ab
--- /dev/null
+++ b/src/bin/pg_checksums/t/002_actions.pl
@@ -0,0 +1,235 @@
+
+# Copyright (c) 2021, PostgreSQL Global Development Group
+
+# Do basic sanity checks supported by pg_checksums using
+# an initialized cluster.
+
+use strict;
+use warnings;
+use PostgresNode;
+use TestLib;
+
+use Test::More tests => 63;
+
+
+# Utility routine to create and check a table with corrupted checksums
+# on a wanted tablespace. Note that this stops and starts the node
+# multiple times to perform the checks, leaving the node started
+# at the end.
+sub check_relation_corruption
+{
+ my $node = shift;
+ my $table = shift;
+ my $tablespace = shift;
+ my $pgdata = $node->data_dir;
+
+ # Create table and discover its filesystem location.
+ $node->safe_psql(
+ 'postgres',
+ "CREATE TABLE $table AS SELECT a FROM generate_series(1,10000) AS a;
+ ALTER TABLE $table SET (autovacuum_enabled=false);");
+
+ $node->safe_psql('postgres',
+ "ALTER TABLE " . $table . " SET TABLESPACE " . $tablespace . ";");
+
+ my $file_corrupted =
+ $node->safe_psql('postgres', "SELECT pg_relation_filepath('$table');");
+ my $relfilenode_corrupted = $node->safe_psql('postgres',
+ "SELECT relfilenode FROM pg_class WHERE relname = '$table';");
+
+ $node->stop;
+
+ # Checksums are correct for single relfilenode as the table is not
+ # corrupted yet.
+ command_ok(
+ [
+ 'pg_checksums', '--check',
+ '-D', $pgdata,
+ '--filenode', $relfilenode_corrupted
+ ],
+ "succeeds for single relfilenode on tablespace $tablespace with offline cluster"
+ );
+
+ # Time to create some corruption
+ $node->corrupt_page_checksum($file_corrupted, 0);
+
+ # Checksum checks on single relfilenode fail
+ $node->command_checks_all(
+ [
+ 'pg_checksums', '--check',
+ '-D', $pgdata,
+ '--filenode', $relfilenode_corrupted
+ ],
+ 1,
+ [qr/Bad checksums:.*1/],
+ [qr/checksum verification failed/],
+ "fails with corrupted data for single relfilenode on tablespace $tablespace"
+ );
+
+ # Global checksum checks fail as well
+ $node->command_checks_all(
+ [ 'pg_checksums', '--check', '-D', $pgdata ],
+ 1,
+ [qr/Bad checksums:.*1/],
+ [qr/checksum verification failed/],
+ "fails with corrupted data on tablespace $tablespace");
+
+ # Drop corrupted table again and make sure there is no more corruption.
+ $node->start;
+ $node->safe_psql('postgres', "DROP TABLE $table;");
+ $node->stop;
+ $node->command_ok([ 'pg_checksums', '--check', '-D', $pgdata ],
+ "succeeds again after table drop on tablespace $tablespace");
+
+ $node->start;
+ return;
+}
+
+# Initialize node with checksums disabled.
+my $node = get_new_node('node_checksum');
+$node->init();
+my $pgdata = $node->data_dir;
+
+# Control file should know that checksums are disabled.
+command_like(
+ [ 'pg_controldata', $pgdata ],
+ qr/Data page checksum version:.*0/,
+ 'checksums disabled in control file');
+
+# These are correct but empty files, so they should pass through.
+append_to_file "$pgdata/global/99999", "";
+append_to_file "$pgdata/global/99999.123", "";
+append_to_file "$pgdata/global/99999_fsm", "";
+append_to_file "$pgdata/global/99999_init", "";
+append_to_file "$pgdata/global/99999_vm", "";
+append_to_file "$pgdata/global/99999_init.123", "";
+append_to_file "$pgdata/global/99999_fsm.123", "";
+append_to_file "$pgdata/global/99999_vm.123", "";
+
+# These are temporary files and folders with dummy contents, which
+# should be ignored by the scan.
+append_to_file "$pgdata/global/pgsql_tmp_123", "foo";
+mkdir "$pgdata/global/pgsql_tmp";
+append_to_file "$pgdata/global/pgsql_tmp/1.1", "foo";
+append_to_file "$pgdata/global/pg_internal.init", "foo";
+append_to_file "$pgdata/global/pg_internal.init.123", "foo";
+
+# Enable checksums.
+command_ok([ 'pg_checksums', '--enable', '--no-sync', '-D', $pgdata ],
+ "checksums successfully enabled in cluster");
+
+# Successive attempt to enable checksums fails.
+command_fails([ 'pg_checksums', '--enable', '--no-sync', '-D', $pgdata ],
+ "enabling checksums fails if already enabled");
+
+# Control file should know that checksums are enabled.
+command_like(
+ [ 'pg_controldata', $pgdata ],
+ qr/Data page checksum version:.*1/,
+ 'checksums enabled in control file');
+
+# Disable checksums again. Flush result here as that should be cheap.
+command_ok(
+ [ 'pg_checksums', '--disable', '-D', $pgdata ],
+ "checksums successfully disabled in cluster");
+
+# Successive attempt to disable checksums fails.
+command_fails(
+ [ 'pg_checksums', '--disable', '--no-sync', '-D', $pgdata ],
+ "disabling checksums fails if already disabled");
+
+# Control file should know that checksums are disabled.
+command_like(
+ [ 'pg_controldata', $pgdata ],
+ qr/Data page checksum version:.*0/,
+ 'checksums disabled in control file');
+
+# Enable checksums again for follow-up tests.
+command_ok([ 'pg_checksums', '--enable', '--no-sync', '-D', $pgdata ],
+ "checksums successfully enabled in cluster");
+
+# Control file should know that checksums are enabled.
+command_like(
+ [ 'pg_controldata', $pgdata ],
+ qr/Data page checksum version:.*1/,
+ 'checksums enabled in control file');
+
+# Checksums pass on a newly-created cluster
+command_ok([ 'pg_checksums', '--check', '-D', $pgdata ],
+ "succeeds with offline cluster");
+
+# Checksums are verified if no other arguments are specified
+command_ok(
+ [ 'pg_checksums', '-D', $pgdata ],
+ "verifies checksums as default action");
+
+# Specific relation files cannot be requested when action is --disable
+# or --enable.
+command_fails(
+ [ 'pg_checksums', '--disable', '--filenode', '1234', '-D', $pgdata ],
+ "fails when relfilenodes are requested and action is --disable");
+command_fails(
+ [ 'pg_checksums', '--enable', '--filenode', '1234', '-D', $pgdata ],
+ "fails when relfilenodes are requested and action is --enable");
+
+# Checks cannot happen with an online cluster
+$node->start;
+command_fails([ 'pg_checksums', '--check', '-D', $pgdata ],
+ "fails with online cluster");
+
+# Check corruption of table on default tablespace.
+check_relation_corruption($node, 'corrupt1', 'pg_default');
+
+# Create tablespace to check corruptions in a non-default tablespace.
+my $basedir = $node->basedir;
+my $tablespace_dir = "$basedir/ts_corrupt_dir";
+mkdir($tablespace_dir);
+$node->safe_psql('postgres',
+ "CREATE TABLESPACE ts_corrupt LOCATION '$tablespace_dir';");
+check_relation_corruption($node, 'corrupt2', 'ts_corrupt');
+
+# Utility routine to check that pg_checksums is able to detect
+# correctly-named relation files filled with some corrupted data.
+sub fail_corrupt
+{
+ my $node = shift;
+ my $file = shift;
+ my $pgdata = $node->data_dir;
+
+ # Create the file with some dummy data in it.
+ my $file_name = "$pgdata/global/$file";
+ append_to_file $file_name, "foo";
+
+ $node->command_checks_all(
+ [ 'pg_checksums', '--check', '-D', $pgdata ],
+ 1,
+ [qr/^$/],
+ [qr/could not read block 0 in file.*$file\":/],
+ "fails for corrupted data in $file");
+
+ # Remove file to prevent future lookup errors on conflicts.
+ unlink $file_name;
+ return;
+}
+
+# Stop instance for the follow-up checks.
+$node->stop;
+
+# Create a fake tablespace location that should not be scanned
+# when verifying checksums.
+mkdir "$tablespace_dir/PG_99_999999991/";
+append_to_file "$tablespace_dir/PG_99_999999991/foo", "123";
+command_ok([ 'pg_checksums', '--check', '-D', $pgdata ],
+ "succeeds with foreign tablespace");
+
+# Authorized relation files filled with corrupted data cause the
+# checksum checks to fail. Make sure to use file names different
+# than the previous ones.
+fail_corrupt($node, "99990");
+fail_corrupt($node, "99990.123");
+fail_corrupt($node, "99990_fsm");
+fail_corrupt($node, "99990_init");
+fail_corrupt($node, "99990_vm");
+fail_corrupt($node, "99990_init.123");
+fail_corrupt($node, "99990_fsm.123");
+fail_corrupt($node, "99990_vm.123");