Re: pg_stat_database.checksum_failures misses single-page failures in backups

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Subject: Re: pg_stat_database.checksum_failures misses single-page failures in backups
Date: 2026-08-17 23:01:01
Message-ID: CAN4CZFNmDTKhzjDuRcrGyBGG9+wEjQMsVNPyqyZ5Vew0cyTFZQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> While the report is right, the resulting patch looks incorrect to me.
> It seems to me that we should also report the warning if we have
> checksum_failures == 1

I am not sure, maybe. The original commit 6b9e875f728 only had the
plural form in it. The errmsg_plural was added as part of a message
style sweep commit in 887248e97e2d.

To me it seems like that the original intent was to only print out the
summaries (both this and the similar total_checksum_failures > 1 check
in the same file) if we have more than 1 failure. If we only have 1,
it only prints out the specific info about that failure.

If you think that's better I can simply change the 1 to 0 in this if,
and then for consistency also do the same change in the other if, but
that way we also change what warnings we print out in this case.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-08-17 23:11:04 Re: pg_stat_database.checksum_failures misses single-page failures in backups
Previous Message Michael Paquier 2026-08-17 22:50:27 Re: pg_stat_database.checksum_failures misses single-page failures in backups