In this article
A one-page checksum failure now reaches pg_stat_database during base backup; the counter is diagnostic evidence, not a repair of damaged data.
PostgreSQL 18.7 fixes checksum-failure reporting during base backups. A logic error meant pg_stat_database counted failures only when more than one page in the same file was corrupt. A single damaged page could therefore be missing from that counter. The operational lesson is about the detection threshold: an apparently quiet aggregate did not establish clean backup input, and a small corruption fixture is essential to qualify the repaired reporting path.
One bad page is not a minor version of two
The release identifies the same-file threshold explicitly. A regression matrix should include one corrupt page, two corrupt pages in one file and a clean control. Testing only a heavily damaged file could pass before the patch. A proposed isolated fixture must avoid production data and establish the expected checksum result independently, so a zero count is not misread as correctness when the corruption setup itself failed to reach the checked path.
Observe the reporting target directly
The entry names pg_stat_database, so a qualification record should read the relevant database statistics before and after backup and account for reset boundaries. A log message elsewhere is useful but does not prove the counter changed. Conversely, an increment may reflect an unrelated concurrent operation unless the fixture is isolated. Preserve database identity, backup timing and baseline values so the delta can be attributed to the intended one-page case.
Detection does not make the backup usable
The patch repairs accounting of checksum failures; it does not restore the damaged page or certify the output artifact. An operational response still needs to assess source integrity and the backup’s recovery suitability. Keep the reporting check separate from any repair or restore exercise. The release does not prescribe a universal response to every checksum error, so a targeted test should avoid presenting one counter increment as successful data recovery.
Alert confidence depends on detector coverage
After updating, a checksum alert based on the counter covers the repaired one-page case as well as the previously visible larger case. It still depends on the relevant check being performed and statistics being collected. The absence of an alert is not a general integrity proof for every stored page. The practical contribution is closing a specific reporting blind spot, with controlled negative and positive cases that make the new detector boundary reviewable.
Sources
Related reading
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.