Re: pg_stat_database.checksum_failures vs shared relations

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, Robert Haas <robertmhaas@gmail.com>, pgsql-hackers@postgresql.org, Magnus Hagander <magnus@hagander.net>
Date: 2025-03-28T17:47:16Z
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. Fix mis-attribution of checksum failure stats to the wrong database

  2. Return NULL for checksum failures if checksums are not enabled

  3. Show shared object statistics in pg_stat_database

Attachments

Hi,

Attached is a fix for the issue.

I looked around and didn't find extensions using PageIsVerified[Extended]() in
codesearch.debian.org, so I got rid of the compat macro and renamed
PageIsVerifiedExtended back to PageIsVerified().

Normally I'd commit tests as part of a fix like this, but since I've already
written test infrastructure for checksum failures and their stats as part of
aio, and those tests don't work without more of aio applied, I don't think it
makes sense to write them for just this test.  It's not like anybody has ever
bothered to test checksum failures before...

Greetings,

Andres Freund