Fix wrong log in pgstat_report_checksum_failures_in_db()

Started by wangpeng27 days ago4 messages
Jump to latest
#1wangpeng
215722532@qq.com

Hi hackers,

The function pgstat_report_checksum_failures_in_db(), file
pgstat_database.c,
currently emits a log message referring to "conflicts", which seems wrong.
As the function name suggesting, the log message should refer to
"checksum failures".

Best regards,
Wang Peng

Attachments:

v1-0001-Fix-wrong-log-in-pgstat_report_checksum_failures.patchtext/plain; charset=UTF-8; name=v1-0001-Fix-wrong-log-in-pgstat_report_checksum_failures.patchDownload+1-2
#2Michael Paquier
michael@paquier.xyz
In reply to: wangpeng (#1)
Re: Fix wrong log in pgstat_report_checksum_failures_in_db()

On Wed, Feb 11, 2026 at 05:22:27PM +0800, wangpeng wrote:

The function pgstat_report_checksum_failures_in_db(), file
pgstat_database.c,
currently emits a log message referring to "conflicts", which seems wrong.
As the function name suggesting, the log message should refer to "checksum
failures".

Right, that's strange. It looks like a copy-pasto, but I am not sure
from where.

-		elog(WARNING, "could not report %d conflicts for DB %u",
+		elog(WARNING, "could not report %d checksum failures for DB %u",
failurecount, dboid);

We may as well use "for database" here. Let's improve it a bit more
while on it, even if it is not translated.
--
Michael

#3wangpeng
215722532@qq.com
In reply to: Michael Paquier (#2)
Re: Fix wrong log in pgstat_report_checksum_failures_in_db()

Michael Paquier 写于 2026/2/11 19:06:

On Wed, Feb 11, 2026 at 05:22:27PM +0800, wangpeng wrote:

The function pgstat_report_checksum_failures_in_db(), file
pgstat_database.c,
currently emits a log message referring to "conflicts", which seems wrong.
As the function name suggesting, the log message should refer to "checksum
failures".

Right, that's strange. It looks like a copy-pasto, but I am not sure
from where.

-		elog(WARNING, "could not report %d conflicts for DB %u",
+		elog(WARNING, "could not report %d checksum failures for DB %u",
failurecount, dboid);

We may as well use "for database" here. Let's improve it a bit more
while on it, even if it is not translated.
--
Michael

Thanks for your review. Updated "for DB" to "for database" in v2.

Best regards,
Wang Peng

Attachments:

v2-0001-Fix-wrong-log-in-pgstat_report_checksum_failures.patchtext/plain; charset=UTF-8; name=v2-0001-Fix-wrong-log-in-pgstat_report_checksum_failures.patchDownload+1-2
#4Michael Paquier
michael@paquier.xyz
In reply to: wangpeng (#3)
Re: Fix wrong log in pgstat_report_checksum_failures_in_db()

On Thu, Feb 12, 2026 at 08:59:13AM +0800, wangpeng wrote:

Thanks for your review. Updated "for DB" to "for database" in v2.

Thanks. Applied that now down to v18.
--
Michael