pg_integrity_checksums
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 |
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 |
Source
github.com/VictorNagibator/pg_integrity_checksums
pg_integrity_checksums-2.0.0.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
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
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:
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.
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.