Postgres 18 New Default for Data Checksums and How to Deal with Upgrades

2 pointsposted 2 days ago
by enz

2 Comments

enz

2 days ago

> This appears in the release notes as a fairly minor change but it significantly boosts the defense against one of the sneakiest problems in data management - silent data corruption.

I’ve always been puzzled about the fact there was no checksum by default. Integrity of data is a core job of a DB after all. I’m curious to know if there was a technical justification for that.

imbradn

19 hours ago

It was carried forward from days before checksums were a thing for the main data files. Enabling them on existing clusters was not added until PG 14 (in core - there was a utility prior that that could do it, but not much before). So before this there was no real way to enable them on existing clusters short of using logical replication (which as a ton of caveats and issues).

Even today, enabling as in the blog is not officially supported as far as I know (but it does work - I have done it in the past across tens of thousands of DB clusters) and is far from simple.