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.1.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; superuser install; relation checks require SELECT and reject RLS. 2.1.0 canonicalizes logical byte order; upgrades from 2.0.0 must recompute Hash-index and system-inclusive baselines.

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT PIGSTY 2.1.0 18 17 16 15 14 pg_integrity_checksums -
RPM PIGSTY 2.1.0 18 17 16 15 14 pg_integrity_checksums_$v -
DEB PIGSTY 2.1.0 18 17 16 15 14 postgresql-$v-pg-integrity-checksums -
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
el8.aarch64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
el9.x86_64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
el9.aarch64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
el10.x86_64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
el10.aarch64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
d12.x86_64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
d12.aarch64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
d13.x86_64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
d13.aarch64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
u22.x86_64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
u22.aarch64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
u24.x86_64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
u24.aarch64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
u26.x86_64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
u26.aarch64 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0 PIGSTY 2.1.0
Package Version OS ORG SIZE File URL
pg_integrity_checksums_18 2.1.0 el8.x86_64 pigsty 94.3 KiB pg_integrity_checksums_18-2.1.0-1PGSTY.el8.x86_64.rpm
pg_integrity_checksums_18 2.1.0 el8.aarch64 pigsty 91.9 KiB pg_integrity_checksums_18-2.1.0-1PGSTY.el8.aarch64.rpm
pg_integrity_checksums_18 2.1.0 el9.x86_64 pigsty 95.7 KiB pg_integrity_checksums_18-2.1.0-1PGSTY.el9.x86_64.rpm
pg_integrity_checksums_18 2.1.0 el9.aarch64 pigsty 94.4 KiB pg_integrity_checksums_18-2.1.0-1PGSTY.el9.aarch64.rpm
pg_integrity_checksums_18 2.1.0 el10.x86_64 pigsty 96.3 KiB pg_integrity_checksums_18-2.1.0-1PGSTY.el10.x86_64.rpm
pg_integrity_checksums_18 2.1.0 el10.aarch64 pigsty 94.9 KiB pg_integrity_checksums_18-2.1.0-1PGSTY.el10.aarch64.rpm
postgresql-18-pg-integrity-checksums 2.1.0 d12.x86_64 pigsty 86.6 KiB postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_amd64.deb
postgresql-18-pg-integrity-checksums 2.1.0 d12.aarch64 pigsty 85.1 KiB postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_arm64.deb
postgresql-18-pg-integrity-checksums 2.1.0 d13.x86_64 pigsty 86.7 KiB postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~trixie_amd64.deb
postgresql-18-pg-integrity-checksums 2.1.0 d13.aarch64 pigsty 85.2 KiB postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~trixie_arm64.deb
postgresql-18-pg-integrity-checksums 2.1.0 u22.x86_64 pigsty 92.7 KiB postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~jammy_amd64.deb
postgresql-18-pg-integrity-checksums 2.1.0 u22.aarch64 pigsty 91.1 KiB postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~jammy_arm64.deb
postgresql-18-pg-integrity-checksums 2.1.0 u24.x86_64 pigsty 89.5 KiB postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~noble_amd64.deb
postgresql-18-pg-integrity-checksums 2.1.0 u24.aarch64 pigsty 89.4 KiB postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~noble_arm64.deb
postgresql-18-pg-integrity-checksums 2.1.0 u26.x86_64 pigsty 88.8 KiB postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~resolute_amd64.deb
postgresql-18-pg-integrity-checksums 2.1.0 u26.aarch64 pigsty 87.5 KiB postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pg_integrity_checksums_17 2.1.0 el8.x86_64 pigsty 94.1 KiB pg_integrity_checksums_17-2.1.0-1PGSTY.el8.x86_64.rpm
pg_integrity_checksums_17 2.1.0 el8.aarch64 pigsty 91.8 KiB pg_integrity_checksums_17-2.1.0-1PGSTY.el8.aarch64.rpm
pg_integrity_checksums_17 2.1.0 el9.x86_64 pigsty 95.4 KiB pg_integrity_checksums_17-2.1.0-1PGSTY.el9.x86_64.rpm
pg_integrity_checksums_17 2.1.0 el9.aarch64 pigsty 94.2 KiB pg_integrity_checksums_17-2.1.0-1PGSTY.el9.aarch64.rpm
pg_integrity_checksums_17 2.1.0 el10.x86_64 pigsty 96.0 KiB pg_integrity_checksums_17-2.1.0-1PGSTY.el10.x86_64.rpm
pg_integrity_checksums_17 2.1.0 el10.aarch64 pigsty 94.7 KiB pg_integrity_checksums_17-2.1.0-1PGSTY.el10.aarch64.rpm
postgresql-17-pg-integrity-checksums 2.1.0 d12.x86_64 pigsty 86.4 KiB postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_amd64.deb
postgresql-17-pg-integrity-checksums 2.1.0 d12.aarch64 pigsty 85.0 KiB postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_arm64.deb
postgresql-17-pg-integrity-checksums 2.1.0 d13.x86_64 pigsty 86.6 KiB postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~trixie_amd64.deb
postgresql-17-pg-integrity-checksums 2.1.0 d13.aarch64 pigsty 85.1 KiB postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~trixie_arm64.deb
postgresql-17-pg-integrity-checksums 2.1.0 u22.x86_64 pigsty 98.9 KiB postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~jammy_amd64.deb
postgresql-17-pg-integrity-checksums 2.1.0 u22.aarch64 pigsty 97.2 KiB postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~jammy_arm64.deb
postgresql-17-pg-integrity-checksums 2.1.0 u24.x86_64 pigsty 89.3 KiB postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~noble_amd64.deb
postgresql-17-pg-integrity-checksums 2.1.0 u24.aarch64 pigsty 89.3 KiB postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~noble_arm64.deb
postgresql-17-pg-integrity-checksums 2.1.0 u26.x86_64 pigsty 88.5 KiB postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~resolute_amd64.deb
postgresql-17-pg-integrity-checksums 2.1.0 u26.aarch64 pigsty 87.4 KiB postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pg_integrity_checksums_16 2.1.0 el8.x86_64 pigsty 94.8 KiB pg_integrity_checksums_16-2.1.0-1PGSTY.el8.x86_64.rpm
pg_integrity_checksums_16 2.1.0 el8.aarch64 pigsty 92.4 KiB pg_integrity_checksums_16-2.1.0-1PGSTY.el8.aarch64.rpm
pg_integrity_checksums_16 2.1.0 el9.x86_64 pigsty 95.9 KiB pg_integrity_checksums_16-2.1.0-1PGSTY.el9.x86_64.rpm
pg_integrity_checksums_16 2.1.0 el9.aarch64 pigsty 94.8 KiB pg_integrity_checksums_16-2.1.0-1PGSTY.el9.aarch64.rpm
pg_integrity_checksums_16 2.1.0 el10.x86_64 pigsty 96.4 KiB pg_integrity_checksums_16-2.1.0-1PGSTY.el10.x86_64.rpm
pg_integrity_checksums_16 2.1.0 el10.aarch64 pigsty 95.3 KiB pg_integrity_checksums_16-2.1.0-1PGSTY.el10.aarch64.rpm
postgresql-16-pg-integrity-checksums 2.1.0 d12.x86_64 pigsty 86.9 KiB postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_amd64.deb
postgresql-16-pg-integrity-checksums 2.1.0 d12.aarch64 pigsty 85.4 KiB postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_arm64.deb
postgresql-16-pg-integrity-checksums 2.1.0 d13.x86_64 pigsty 87.1 KiB postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~trixie_amd64.deb
postgresql-16-pg-integrity-checksums 2.1.0 d13.aarch64 pigsty 85.6 KiB postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~trixie_arm64.deb
postgresql-16-pg-integrity-checksums 2.1.0 u22.x86_64 pigsty 99.4 KiB postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~jammy_amd64.deb
postgresql-16-pg-integrity-checksums 2.1.0 u22.aarch64 pigsty 97.7 KiB postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~jammy_arm64.deb
postgresql-16-pg-integrity-checksums 2.1.0 u24.x86_64 pigsty 89.7 KiB postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~noble_amd64.deb
postgresql-16-pg-integrity-checksums 2.1.0 u24.aarch64 pigsty 90.8 KiB postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~noble_arm64.deb
postgresql-16-pg-integrity-checksums 2.1.0 u26.x86_64 pigsty 89.0 KiB postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~resolute_amd64.deb
postgresql-16-pg-integrity-checksums 2.1.0 u26.aarch64 pigsty 88.0 KiB postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pg_integrity_checksums_15 2.1.0 el8.x86_64 pigsty 94.2 KiB pg_integrity_checksums_15-2.1.0-1PGSTY.el8.x86_64.rpm
pg_integrity_checksums_15 2.1.0 el8.aarch64 pigsty 91.8 KiB pg_integrity_checksums_15-2.1.0-1PGSTY.el8.aarch64.rpm
pg_integrity_checksums_15 2.1.0 el9.x86_64 pigsty 95.3 KiB pg_integrity_checksums_15-2.1.0-1PGSTY.el9.x86_64.rpm
pg_integrity_checksums_15 2.1.0 el9.aarch64 pigsty 94.1 KiB pg_integrity_checksums_15-2.1.0-1PGSTY.el9.aarch64.rpm
pg_integrity_checksums_15 2.1.0 el10.x86_64 pigsty 96.0 KiB pg_integrity_checksums_15-2.1.0-1PGSTY.el10.x86_64.rpm
pg_integrity_checksums_15 2.1.0 el10.aarch64 pigsty 94.7 KiB pg_integrity_checksums_15-2.1.0-1PGSTY.el10.aarch64.rpm
postgresql-15-pg-integrity-checksums 2.1.0 d12.x86_64 pigsty 86.3 KiB postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_amd64.deb
postgresql-15-pg-integrity-checksums 2.1.0 d12.aarch64 pigsty 92.0 KiB postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_arm64.deb
postgresql-15-pg-integrity-checksums 2.1.0 d13.x86_64 pigsty 86.7 KiB postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~trixie_amd64.deb
postgresql-15-pg-integrity-checksums 2.1.0 d13.aarch64 pigsty 84.8 KiB postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~trixie_arm64.deb
postgresql-15-pg-integrity-checksums 2.1.0 u22.x86_64 pigsty 98.9 KiB postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~jammy_amd64.deb
postgresql-15-pg-integrity-checksums 2.1.0 u22.aarch64 pigsty 97.1 KiB postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~jammy_arm64.deb
postgresql-15-pg-integrity-checksums 2.1.0 u24.x86_64 pigsty 89.3 KiB postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~noble_amd64.deb
postgresql-15-pg-integrity-checksums 2.1.0 u24.aarch64 pigsty 88.9 KiB postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~noble_arm64.deb
postgresql-15-pg-integrity-checksums 2.1.0 u26.x86_64 pigsty 88.6 KiB postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~resolute_amd64.deb
postgresql-15-pg-integrity-checksums 2.1.0 u26.aarch64 pigsty 87.4 KiB postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pg_integrity_checksums_14 2.1.0 el8.x86_64 pigsty 94.4 KiB pg_integrity_checksums_14-2.1.0-1PGSTY.el8.x86_64.rpm
pg_integrity_checksums_14 2.1.0 el8.aarch64 pigsty 92.4 KiB pg_integrity_checksums_14-2.1.0-1PGSTY.el8.aarch64.rpm
pg_integrity_checksums_14 2.1.0 el9.x86_64 pigsty 95.6 KiB pg_integrity_checksums_14-2.1.0-1PGSTY.el9.x86_64.rpm
pg_integrity_checksums_14 2.1.0 el9.aarch64 pigsty 94.7 KiB pg_integrity_checksums_14-2.1.0-1PGSTY.el9.aarch64.rpm
pg_integrity_checksums_14 2.1.0 el10.x86_64 pigsty 96.2 KiB pg_integrity_checksums_14-2.1.0-1PGSTY.el10.x86_64.rpm
pg_integrity_checksums_14 2.1.0 el10.aarch64 pigsty 95.3 KiB pg_integrity_checksums_14-2.1.0-1PGSTY.el10.aarch64.rpm
postgresql-14-pg-integrity-checksums 2.1.0 d12.x86_64 pigsty 86.5 KiB postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_amd64.deb
postgresql-14-pg-integrity-checksums 2.1.0 d12.aarch64 pigsty 84.7 KiB postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_arm64.deb
postgresql-14-pg-integrity-checksums 2.1.0 d13.x86_64 pigsty 86.7 KiB postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~trixie_amd64.deb
postgresql-14-pg-integrity-checksums 2.1.0 d13.aarch64 pigsty 84.9 KiB postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~trixie_arm64.deb
postgresql-14-pg-integrity-checksums 2.1.0 u22.x86_64 pigsty 98.7 KiB postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~jammy_amd64.deb
postgresql-14-pg-integrity-checksums 2.1.0 u22.aarch64 pigsty 97.3 KiB postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~jammy_arm64.deb
postgresql-14-pg-integrity-checksums 2.1.0 u24.x86_64 pigsty 89.4 KiB postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~noble_amd64.deb
postgresql-14-pg-integrity-checksums 2.1.0 u24.aarch64 pigsty 89.2 KiB postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~noble_arm64.deb
postgresql-14-pg-integrity-checksums 2.1.0 u26.x86_64 pigsty 88.7 KiB postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~resolute_amd64.deb
postgresql-14-pg-integrity-checksums 2.1.0 u26.aarch64 pigsty 87.8 KiB postgresql-14-pg-integrity-checksums_2.1.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–19 upstream; Pigsty packages target PostgreSQL 14–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.2

Version 2.0.2 adds PostgreSQL 19 API compatibility by adapting the array iterator and table-scan calls. It changes no SQL objects, and the 2.0.1-to-2.0.2 SQL upgrade is a no-op. Pigsty builds cover PostgreSQL 14–18.

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.

Table reader