Data page checksums
Checksums can be added to data pages to assist corruption detection caused by storage system errors.
Checksums can be added to data pages to assist corruption detection caused by storage system errors. They can only be set at initdb time and for the entire database cluster; it is not possible to later convert the cluster or an individual database to use checksums.
Checksums were introduced in PostgreSQL 9.3.
Determine if checksums are enabled
To determine whether checksums are enabled on a PostgreSQL instance, query the preset GUC
From PostgreSQL 9.6 execute e.g. "
SELECT data_page_checksum_version FROM pg_control_init()".
For all versions this value is reported as "
Data page checksum version" by pg_controldata. "
0" means not enabled.
From PostgreSQL 12, the utility
pg_checksums enables the verification of all data page checksums.
In PostgreSQL 11, the utility
pg_verify_checksums can be used for the same purpose.