pgsql: Report single-page checksum failures in pg_stat_database

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Report single-page checksum failures in pg_stat_database
Date: 2026-08-19 00:52:47
Message-ID: E1wwUXu-000000018N4-0C4l@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Report single-page checksum failures in pg_stat_database

Base backups reported checksum failures to pg_stat_database only for
files with more than one failing page. Commit 6b9e875f728 placed the
report inside the block emitting the per-file summary WARNING, which
was skipped for a single failure. As a result, a backup failing on
files with one corrupted page each left checksum_failures untouched.

To fix, emit the per-file summary and the pgstat report for any
non-zero failure count. The end-of-backup total WARNING had the same
off-by-one and is now also emitted for a single failure.

Author: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Reviewed-by: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAN4CZFN+Bi6XmaH8zOdMWjoycYFx9nKtOr+dzQf0o-UQ+Rdqmw@mail.gmail.com
Backpatch-through: 14

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/19d900358fd6f200ada6aabfa4d44d83c16a3f0a

Modified Files
--------------
src/backend/replication/basebackup.c | 13 ++++++-------
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 16 +++++++++++++++-
2 files changed, 21 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Richard Guo 2026-08-19 01:25:22 pgsql: Relax strictness detection for row-format IS NOT NULL tests
Previous Message Michael Paquier 2026-08-19 00:52:46 pgsql: Report single-page checksum failures in pg_stat_database