Re: pg_stat_database.checksum_failures misses single-page failures in backups - Mailing list pgsql-hackers

From Zsolt Parragi
Subject Re: pg_stat_database.checksum_failures misses single-page failures in backups
Date
Msg-id CAN4CZFNmDTKhzjDuRcrGyBGG9+wEjQMsVNPyqyZ5Vew0cyTFZQ@mail.gmail.com
Whole thread
In response to Re: pg_stat_database.checksum_failures misses single-page failures in backups  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
Responses Re: pg_stat_database.checksum_failures misses single-page failures in backups
List 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.



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: problems with toast.* reloptions
Next
From: Michael Paquier
Date:
Subject: Re: pg_stat_database.checksum_failures misses single-page failures in backups