]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Improve error message for checksum failures in pgstat_database.c
authorMichael Paquier <michael@paquier.xyz>
Fri, 13 Feb 2026 03:17:08 +0000 (12:17 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 13 Feb 2026 03:17:08 +0000 (12:17 +0900)
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@qq.com>
Discussion: https://postgr.es/m/tencent_9B6CD6D9D34AE28CDEADEC6188DB3BA1FE07@qq.com
Backpatch-through: 18

src/backend/utils/activity/pgstat_database.c

index 6309909bcd020bf4323cd1f7c3a29b5636d25ab9..933dcb5cae51e096d5a5778da4e38910fb80ebb4 100644 (file)
@@ -200,7 +200,7 @@ pgstat_report_checksum_failures_in_db(Oid dboid, int failurecount)
        Assert(entry_ref);
        if (!entry_ref)
        {
-               elog(WARNING, "could not report %d conflicts for DB %u",
+               elog(WARNING, "could not report %d checksum failures for database %u",
                         failurecount, dboid);
                return;
        }