pg_checksums

Activate/deactivate/verify checksums in offline Postgres clusters

Overview

PackageVersionCategoryLicenseLanguage
pg_checksums1.3ADMINBSD 2-ClauseC
IDExtensionBinLibLoadCreateTrustRelocSchema
5110pg_checksumsNoYesNoNoNoYes-
Relatedpg_catcheck amcheck pg_surgery pageinspect pg_visibility pgstattuple pg_repack pg_squeeze

Version

TypeRepoVersionPG VerPackageDeps
EXTPGDG1.31817161514pg_checksums-
RPMPGDG1.31817161514pg_checksums_$v-
DEBPGDG1.31817161514postgresql-$v-pg-checksums-
OS / PGPG18PG17PG16PG15PG14
el8.x86_64
el8.aarch64
el9.x86_64
el9.aarch64
el10.x86_64
el10.aarch64
d12.x86_64
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
d12.aarch64
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
d13.x86_64
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
d13.aarch64
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
u22.x86_64
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
u22.aarch64
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
u24.x86_64
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
u24.aarch64
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3
PGDG 1.3

Install

You can install pg_checksums directly. First, make sure the PGDG repository is added and enabled:

pig repo add pgdg -u          # Add PGDG repo and update cache

Install the extension using pig or apt/yum/dnf:

pig install pg_checksums;          # Install for current active PG version
pig ext install -y pg_checksums -v 18  # PG 18
pig ext install -y pg_checksums -v 17  # PG 17
pig ext install -y pg_checksums -v 16  # PG 16
pig ext install -y pg_checksums -v 15  # PG 15
pig ext install -y pg_checksums -v 14  # PG 14
dnf install -y pg_checksums_18       # PG 18
dnf install -y pg_checksums_17       # PG 17
dnf install -y pg_checksums_16       # PG 16
dnf install -y pg_checksums_15       # PG 15
dnf install -y pg_checksums_14       # PG 14
apt install -y postgresql-18-pg-checksums   # PG 18
apt install -y postgresql-17-pg-checksums   # PG 17
apt install -y postgresql-16-pg-checksums   # PG 16
apt install -y postgresql-15-pg-checksums   # PG 15
apt install -y postgresql-14-pg-checksums   # PG 14

This extension does not require CREATE EXTENSION

Usage

pg_checksums: Activate/deactivate/verify checksums in offline Postgres clusters

pg_checksums_ext is a command-line tool (based on PostgreSQL’s built-in pg_checksums) that can verify, activate, or deactivate page-level checksums for a PostgreSQL cluster. It extends the built-in tool with online verification, SIGUSR1 progress toggling, fine-grained progress reporting, and I/O rate limiting.

Verify Checksums (can be done online)

pg_checksums_ext -D /path/to/data --check

Enable Checksums (requires clean shutdown)

pg_checksums_ext -D /path/to/data --enable

Disable Checksums (requires clean shutdown)

pg_checksums_ext -D /path/to/data --disable

Additional Options

  • -D, --pgdata – data directory path
  • --check / --enable / --disable – operation mode
  • --progress – show progress reporting
  • --filenode – check only a specific filenode
  • --no-sync – skip fsync
  • --verbose – verbose output
  • --debug – debug output
  • Send SIGUSR1 to toggle progress reporting during operation

Last Modified 2026-03-12: add pg extension catalog (95749bf)