Cristophe Pettus notes an upcoming change to PostgreSQL 19:
For about fifteen years the answer to “can I turn on data checksums without an
initdb?” has been “not really.”pg_checksumsshowed up in PostgreSQL 12 and made the job survivable, but you still had to shut the cluster down. For anyone running 24×7 production, that has left the same three options: take the downtime, fail over through a checksummed replica, or live without checksums.PostgreSQL 19 adds a fourth path. A commit from Daniel Gustafsson on April 3rd wires up online enabling and disabling of data checksums: the command completes immediately, and the cluster keeps serving traffic while a background process rewrites every heap and index page in the cluster to carry (or drop) the checksum.
Read on to see what it will do, as well as the consequences.