PostgreSQL 19 introduces online enabling and disabling of data checksums via two new functions: pg_enable_data_checksums() and pg_disable_data_checksums(). Previously, checksums could only be set during initdb or offline via pg_checksums. The new feature uses a background worker that marks all buffers dirty so checksums are written on the next page write, transitioning through an 'inprogress-on' state before fully activating. The process is non-blocking — the cluster remains accessible throughout. To throttle the IO-intensive rewrite, pg_enable_data_checksums() accepts cost_delay and cost_limit arguments mirroring vacuum cost parameters. This is especially valuable for long-running clusters that were initialized without checksums and couldn't enable them without a full re-initdb and data reload.

7m read timeFrom depesz.com
Post cover image

Sort: