Skip to content

pg_integrity_checksums

Physical and logical checksums for PostgreSQL pages, rows, tables, indexes and databases.

pg_integrity_checksums : Physical and logical checksums for PostgreSQL pages, rows, tables, indexes and databases.

Overview

ID Extension Package Version Category License Language
5115 pg_integrity_checksums pg_integrity_checksums 2.0.0 ADMIN MIT C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-d-r No Yes No Yes yes no
Relationships
See Also amcheck pg_checksums
Former pg_checksums SQL extension, unrelated to the core/PGDG utility. Old/new extensions cannot share a schema; follow MIGRATION.md. Superuser install; relation checks enforce SELECT and reject RLS; database checks require superuser. Logical checksums compare content; physical checksums depend on storage. PG14-18.

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT PIGSTY 2.0.0 18 17 16 15 14 pg_integrity_checksums -
RPM PIGSTY 2.0.0 18 17 16 15 14 pg_integrity_checksums_$v -
DEB PIGSTY 2.0.0 18 17 16 15 14 postgresql-$v-pg-integrity-checksums -
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
el8.aarch64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
el9.x86_64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
el9.aarch64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
el10.x86_64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
el10.aarch64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
d12.x86_64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
d12.aarch64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
d13.x86_64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
d13.aarch64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
u22.x86_64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
u22.aarch64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
u24.x86_64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
u24.aarch64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
u26.x86_64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
u26.aarch64 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0 PIGSTY 2.0.0
Package Version OS ORG SIZE File URL
pg_integrity_checksums_18 2.0.0 el8.x86_64 pigsty 89.6 KiB pg_integrity_checksums_18-2.0.0-1PGSTY.el8.x86_64.rpm
pg_integrity_checksums_18 2.0.0 el8.aarch64 pigsty 87.2 KiB pg_integrity_checksums_18-2.0.0-1PGSTY.el8.aarch64.rpm
pg_integrity_checksums_18 2.0.0 el9.x86_64 pigsty 91.1 KiB pg_integrity_checksums_18-2.0.0-1PGSTY.el9.x86_64.rpm
pg_integrity_checksums_18 2.0.0 el9.aarch64 pigsty 89.5 KiB pg_integrity_checksums_18-2.0.0-1PGSTY.el9.aarch64.rpm
pg_integrity_checksums_18 2.0.0 el10.x86_64 pigsty 91.6 KiB pg_integrity_checksums_18-2.0.0-1PGSTY.el10.x86_64.rpm
pg_integrity_checksums_18 2.0.0 el10.aarch64 pigsty 90.1 KiB pg_integrity_checksums_18-2.0.0-1PGSTY.el10.aarch64.rpm
postgresql-18-pg-integrity-checksums 2.0.0 d12.x86_64 pigsty 82.6 KiB postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_amd64.deb
postgresql-18-pg-integrity-checksums 2.0.0 d12.aarch64 pigsty 81.1 KiB postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_arm64.deb
postgresql-18-pg-integrity-checksums 2.0.0 d13.x86_64 pigsty 82.7 KiB postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~trixie_amd64.deb
postgresql-18-pg-integrity-checksums 2.0.0 d13.aarch64 pigsty 81.4 KiB postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~trixie_arm64.deb
postgresql-18-pg-integrity-checksums 2.0.0 u22.x86_64 pigsty 88.6 KiB postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~jammy_amd64.deb
postgresql-18-pg-integrity-checksums 2.0.0 u22.aarch64 pigsty 87.0 KiB postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~jammy_arm64.deb
postgresql-18-pg-integrity-checksums 2.0.0 u24.x86_64 pigsty 85.4 KiB postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~noble_amd64.deb
postgresql-18-pg-integrity-checksums 2.0.0 u24.aarch64 pigsty 85.5 KiB postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~noble_arm64.deb
postgresql-18-pg-integrity-checksums 2.0.0 u26.x86_64 pigsty 85.3 KiB postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~resolute_amd64.deb
postgresql-18-pg-integrity-checksums 2.0.0 u26.aarch64 pigsty 83.7 KiB postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pg_integrity_checksums_17 2.0.0 el8.x86_64 pigsty 89.4 KiB pg_integrity_checksums_17-2.0.0-1PGSTY.el8.x86_64.rpm
pg_integrity_checksums_17 2.0.0 el8.aarch64 pigsty 87.0 KiB pg_integrity_checksums_17-2.0.0-1PGSTY.el8.aarch64.rpm
pg_integrity_checksums_17 2.0.0 el9.x86_64 pigsty 90.8 KiB pg_integrity_checksums_17-2.0.0-1PGSTY.el9.x86_64.rpm
pg_integrity_checksums_17 2.0.0 el9.aarch64 pigsty 89.2 KiB pg_integrity_checksums_17-2.0.0-1PGSTY.el9.aarch64.rpm
pg_integrity_checksums_17 2.0.0 el10.x86_64 pigsty 91.4 KiB pg_integrity_checksums_17-2.0.0-1PGSTY.el10.x86_64.rpm
pg_integrity_checksums_17 2.0.0 el10.aarch64 pigsty 89.8 KiB pg_integrity_checksums_17-2.0.0-1PGSTY.el10.aarch64.rpm
postgresql-17-pg-integrity-checksums 2.0.0 d12.x86_64 pigsty 82.4 KiB postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_amd64.deb
postgresql-17-pg-integrity-checksums 2.0.0 d12.aarch64 pigsty 80.9 KiB postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_arm64.deb
postgresql-17-pg-integrity-checksums 2.0.0 d13.x86_64 pigsty 82.5 KiB postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~trixie_amd64.deb
postgresql-17-pg-integrity-checksums 2.0.0 d13.aarch64 pigsty 81.1 KiB postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~trixie_arm64.deb
postgresql-17-pg-integrity-checksums 2.0.0 u22.x86_64 pigsty 94.7 KiB postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~jammy_amd64.deb
postgresql-17-pg-integrity-checksums 2.0.0 u22.aarch64 pigsty 93.0 KiB postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~jammy_arm64.deb
postgresql-17-pg-integrity-checksums 2.0.0 u24.x86_64 pigsty 85.2 KiB postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~noble_amd64.deb
postgresql-17-pg-integrity-checksums 2.0.0 u24.aarch64 pigsty 85.4 KiB postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~noble_arm64.deb
postgresql-17-pg-integrity-checksums 2.0.0 u26.x86_64 pigsty 85.0 KiB postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~resolute_amd64.deb
postgresql-17-pg-integrity-checksums 2.0.0 u26.aarch64 pigsty 83.5 KiB postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pg_integrity_checksums_16 2.0.0 el8.x86_64 pigsty 90.1 KiB pg_integrity_checksums_16-2.0.0-1PGSTY.el8.x86_64.rpm
pg_integrity_checksums_16 2.0.0 el8.aarch64 pigsty 87.6 KiB pg_integrity_checksums_16-2.0.0-1PGSTY.el8.aarch64.rpm
pg_integrity_checksums_16 2.0.0 el9.x86_64 pigsty 91.3 KiB pg_integrity_checksums_16-2.0.0-1PGSTY.el9.x86_64.rpm
pg_integrity_checksums_16 2.0.0 el9.aarch64 pigsty 89.8 KiB pg_integrity_checksums_16-2.0.0-1PGSTY.el9.aarch64.rpm
pg_integrity_checksums_16 2.0.0 el10.x86_64 pigsty 92.0 KiB pg_integrity_checksums_16-2.0.0-1PGSTY.el10.x86_64.rpm
pg_integrity_checksums_16 2.0.0 el10.aarch64 pigsty 90.4 KiB pg_integrity_checksums_16-2.0.0-1PGSTY.el10.aarch64.rpm
postgresql-16-pg-integrity-checksums 2.0.0 d12.x86_64 pigsty 82.9 KiB postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_amd64.deb
postgresql-16-pg-integrity-checksums 2.0.0 d12.aarch64 pigsty 81.4 KiB postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_arm64.deb
postgresql-16-pg-integrity-checksums 2.0.0 d13.x86_64 pigsty 83.0 KiB postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~trixie_amd64.deb
postgresql-16-pg-integrity-checksums 2.0.0 d13.aarch64 pigsty 81.6 KiB postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~trixie_arm64.deb
postgresql-16-pg-integrity-checksums 2.0.0 u22.x86_64 pigsty 95.2 KiB postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~jammy_amd64.deb
postgresql-16-pg-integrity-checksums 2.0.0 u22.aarch64 pigsty 93.5 KiB postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~jammy_arm64.deb
postgresql-16-pg-integrity-checksums 2.0.0 u24.x86_64 pigsty 85.8 KiB postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~noble_amd64.deb
postgresql-16-pg-integrity-checksums 2.0.0 u24.aarch64 pigsty 86.7 KiB postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~noble_arm64.deb
postgresql-16-pg-integrity-checksums 2.0.0 u26.x86_64 pigsty 85.6 KiB postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~resolute_amd64.deb
postgresql-16-pg-integrity-checksums 2.0.0 u26.aarch64 pigsty 83.9 KiB postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pg_integrity_checksums_15 2.0.0 el8.x86_64 pigsty 89.4 KiB pg_integrity_checksums_15-2.0.0-1PGSTY.el8.x86_64.rpm
pg_integrity_checksums_15 2.0.0 el8.aarch64 pigsty 87.1 KiB pg_integrity_checksums_15-2.0.0-1PGSTY.el8.aarch64.rpm
pg_integrity_checksums_15 2.0.0 el9.x86_64 pigsty 90.5 KiB pg_integrity_checksums_15-2.0.0-1PGSTY.el9.x86_64.rpm
pg_integrity_checksums_15 2.0.0 el9.aarch64 pigsty 89.1 KiB pg_integrity_checksums_15-2.0.0-1PGSTY.el9.aarch64.rpm
pg_integrity_checksums_15 2.0.0 el10.x86_64 pigsty 91.4 KiB pg_integrity_checksums_15-2.0.0-1PGSTY.el10.x86_64.rpm
pg_integrity_checksums_15 2.0.0 el10.aarch64 pigsty 89.9 KiB pg_integrity_checksums_15-2.0.0-1PGSTY.el10.aarch64.rpm
postgresql-15-pg-integrity-checksums 2.0.0 d12.x86_64 pigsty 82.4 KiB postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_amd64.deb
postgresql-15-pg-integrity-checksums 2.0.0 d12.aarch64 pigsty 87.9 KiB postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_arm64.deb
postgresql-15-pg-integrity-checksums 2.0.0 d13.x86_64 pigsty 82.8 KiB postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~trixie_amd64.deb
postgresql-15-pg-integrity-checksums 2.0.0 d13.aarch64 pigsty 80.7 KiB postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~trixie_arm64.deb
postgresql-15-pg-integrity-checksums 2.0.0 u22.x86_64 pigsty 94.9 KiB postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~jammy_amd64.deb
postgresql-15-pg-integrity-checksums 2.0.0 u22.aarch64 pigsty 93.0 KiB postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~jammy_arm64.deb
postgresql-15-pg-integrity-checksums 2.0.0 u24.x86_64 pigsty 85.4 KiB postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~noble_amd64.deb
postgresql-15-pg-integrity-checksums 2.0.0 u24.aarch64 pigsty 85.0 KiB postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~noble_arm64.deb
postgresql-15-pg-integrity-checksums 2.0.0 u26.x86_64 pigsty 85.1 KiB postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~resolute_amd64.deb
postgresql-15-pg-integrity-checksums 2.0.0 u26.aarch64 pigsty 83.3 KiB postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pg_integrity_checksums_14 2.0.0 el8.x86_64 pigsty 89.7 KiB pg_integrity_checksums_14-2.0.0-1PGSTY.el8.x86_64.rpm
pg_integrity_checksums_14 2.0.0 el8.aarch64 pigsty 87.6 KiB pg_integrity_checksums_14-2.0.0-1PGSTY.el8.aarch64.rpm
pg_integrity_checksums_14 2.0.0 el9.x86_64 pigsty 91.3 KiB pg_integrity_checksums_14-2.0.0-1PGSTY.el9.x86_64.rpm
pg_integrity_checksums_14 2.0.0 el9.aarch64 pigsty 89.9 KiB pg_integrity_checksums_14-2.0.0-1PGSTY.el9.aarch64.rpm
pg_integrity_checksums_14 2.0.0 el10.x86_64 pigsty 91.4 KiB pg_integrity_checksums_14-2.0.0-1PGSTY.el10.x86_64.rpm
pg_integrity_checksums_14 2.0.0 el10.aarch64 pigsty 90.5 KiB pg_integrity_checksums_14-2.0.0-1PGSTY.el10.aarch64.rpm
postgresql-14-pg-integrity-checksums 2.0.0 d12.x86_64 pigsty 82.5 KiB postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_amd64.deb
postgresql-14-pg-integrity-checksums 2.0.0 d12.aarch64 pigsty 80.7 KiB postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_arm64.deb
postgresql-14-pg-integrity-checksums 2.0.0 d13.x86_64 pigsty 82.7 KiB postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~trixie_amd64.deb
postgresql-14-pg-integrity-checksums 2.0.0 d13.aarch64 pigsty 81.1 KiB postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~trixie_arm64.deb
postgresql-14-pg-integrity-checksums 2.0.0 u22.x86_64 pigsty 94.6 KiB postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~jammy_amd64.deb
postgresql-14-pg-integrity-checksums 2.0.0 u22.aarch64 pigsty 93.1 KiB postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~jammy_arm64.deb
postgresql-14-pg-integrity-checksums 2.0.0 u24.x86_64 pigsty 85.5 KiB postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~noble_amd64.deb
postgresql-14-pg-integrity-checksums 2.0.0 u24.aarch64 pigsty 85.2 KiB postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~noble_arm64.deb
postgresql-14-pg-integrity-checksums 2.0.0 u26.x86_64 pigsty 85.2 KiB postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~resolute_amd64.deb
postgresql-14-pg-integrity-checksums 2.0.0 u26.aarch64 pigsty 83.9 KiB postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~resolute_arm64.deb

Source

github.com/VictorNagibator/pg_integrity_checksums

pig build pkg pg_integrity_checksums;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install pg_integrity_checksums;		# install via package name, for the active PG version

pig install pg_integrity_checksums -v 18;   # install for PG 18
pig install pg_integrity_checksums -v 17;   # install for PG 17
pig install pg_integrity_checksums -v 16;   # install for PG 16
pig install pg_integrity_checksums -v 15;   # install for PG 15
pig install pg_integrity_checksums -v 14;   # install for PG 14

Create this extension with:

CREATE EXTENSION pg_integrity_checksums;

Usage

Sources:

pg_integrity_checksums computes physical and logical checksums for PostgreSQL pages, cells, tuples, tables, indexes and databases. It is a C extension for PostgreSQL 12–18 and reads relation storage directly, so installation and database-wide checks require a superuser.

Install and migrate

CREATE EXTENSION pg_integrity_checksums;

Version 2.0.0 is the renamed continuation of the earlier pg_checksums extension. PostgreSQL has no ALTER EXTENSION ... RENAME; review dependent objects, drop the old extension, create the new one, and change the GUC prefix before using the new name:

DROP EXTENSION pg_checksums;
CREATE EXTENSION pg_integrity_checksums;
SET pg_integrity_checksums.workers = 4;
SET pg_integrity_checksums.strict = on;

The old and new names cannot coexist because they define the same SQL functions. The unrelated core pg_checksums utility is a separate program.

Checksum levels

Use logical checksums for content comparison and physical checksums for storage integrity. Logical table checksums do not require a primary key, preserve duplicate rows, and exclude relation and tuple identifiers. Logical index checksums are derived from visible table rows and the index definition, so they are stable across VACUUM, CLUSTER and REINDEX.

SELECT pg_table_logical_checksum('public.orders'::regclass);
SELECT pg_index_logical_checksum('public.orders_pkey'::regclass);
SELECT pg_database_logical_checksum(false, true);

Physical checksums include storage details and can change after VACUUM FULL, CLUSTER, REINDEX or other physical rewrites. Use the page, tuple and table physical functions when those changes are relevant to the integrity baseline.

Privileges and maintenance

Relation-level functions require SELECT on the relation and reject row-level-security protected relations because direct storage scans cannot apply RLS. Database-level functions are superuser-only. pg_integrity_checksums.workers controls parallel scans; pg_integrity_checksums.strict makes database scans fail when a relation cannot be checked instead of skipping it. The extension does not require shared preload, but physical baselines must be recomputed after the changes described in the release notes.