pg_checksums

Activate/deactivate/verify PostgreSQL data checksums

Install

All systems
curl cmd.cat/pg_checksums.sh
Debian Debian
apt-get install postgresql-11-pg-checksums
Ubuntu
apt-get install postgresql-11-pg-checksums
image/svg+xml Kali Linux
apt-get install postgresql-11-pg-checksums
Windows (WSL2)
sudo apt-get update sudo apt-get install postgresql-11-pg-checksums

postgresql-11-pg-checksums

Activate/deactivate/verify PostgreSQL data checksums

Data checksums allow the PostgreSQL database server to identify I/O failures when reading data from storage. The checksums stored in the page header of each data page are compared to the computed checksum of the read data. Data checksums need to be activated at instance creation time, all current versions of PostgreSQL including v11 do not allow activating (or deactivating) checksums afterwards. pg_checksums can activate or deactivate data checksums as long at the database cluster is shutdown cleanly. Activating checksums requires all database blocks to be read and all page headers to be updated, so can take a long time on a large database. Deactivating checksums only requires the cluster control file to be updated so is quick. In addition, pg_checksums can verify the checksums in an offline cluster.

postgresql-10-pg-checksums

Activate/deactivate/verify PostgreSQL data checksums