Re: Enable data checksums by default

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Greg Sabino Mullane <htamfids@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-08-15T06:38:38Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Avoid BufferGetLSNAtomic() calls during nbtree scans.

  2. doc PG 18 relnotes: Add incompatibility note about checksums now default

  3. Fix pg_upgrade's cross-version tests when old < 18

  4. initdb: Change default to using data checksums.

  5. Allow TAP tests to force checksums off when calling init()

  6. initdb: Add new option "--no-data-checksums"

  7. Tweak docs to reduce possible impact of data checksums

Attachments

On 08.08.24 19:42, Robert Haas wrote:
>> I'm thinking pg_upgrade could have a mode where it adds the
>> checksum during the upgrade as it copies the files (essentially a subset
>> of pg_checksums).  I think that would be useful for that middle tier of
>> users who just want a good default experience.
> That would be very nice.

Here is a demo patch for that.  It turned out to be quite simple.

I wrote above about a separate mode for that (like 
--copy-and-make-adjustments), but it was just as easy to stick it into 
the existing --copy mode.

It would be useful to check what the performance overhead of this is 
versus a copy that does not have to make adjustments.  I expect it's 
very little.

A drawback is that as written this does not work on Windows, because 
Windows uses a different code path in copyFile().  I don't know the 
reasons for that.  But it would need to be figured out.