pgsql: Improve error message for checksum failures in pgstat_database.c

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve error message for checksum failures in pgstat_database.c
Date: 2026-02-13 03:18:03
Message-ID: E1vqjgw-000V6X-0A@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve error message for checksum failures in pgstat_database.c

This log message was referring to conflicts, but it is about checksum
failures. The log message improved in this commit should never show up,
due to the fact that pgstat_prepare_report_checksum_failure() should
always be called before pgstat_report_checksum_failures_in_db(), with a
stats entry already created in the pgstats shared hash table. The three
code paths able to report database-level checksum failures follow
already this requirement.

Oversight in b96d3c389755.

Author: Wang Peng <215722532(at)qq(dot)com>
Discussion: https://postgr.es/m/tencent_9B6CD6D9D34AE28CDEADEC6188DB3BA1FE07@qq.com
Backpatch-through: 18

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/775fc014156bdfa6938ef02dce3d85364b1bd220

Modified Files
--------------
src/backend/utils/activity/pgstat_database.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bertrand Drouvot 2026-02-13 08:03:04 Re: PGPROC alignment (was Re: pgsql: Separate RecoveryConflictReasons from procsignals)
Previous Message Tom Lane 2026-02-12 19:04:39 Re: pgsql: Add file_extend_method=posix_fallocate,write_zeros.