de-catalog one error message - Mailing list pgsql-hackers

From Alvaro Herrera
Subject de-catalog one error message
Date
Msg-id 20230510175407.dwa5v477pw62ikyx@alvherre.pgsql
Whole thread Raw
Responses Re: de-catalog one error message
List pgsql-hackers
Hi

While translating the v15 message catalog (yes, I'm quite late!), I
noticed that commit 1f39bce02154 introduced three copies of the
following message in hashagg_batch_read():

+       ereport(ERROR,
+               (errcode_for_file_access(),
+                errmsg("unexpected EOF for tape %d: requested %zu bytes, read %zu bytes",
+                       tapenum, sizeof(uint32), nread)));

These messages should only arise when a hash spill file has gone
corrupt: as I understand, this cannot happen merely because of a full
disk,  because that should fail during _write_ of the file, not read.
And no other user-caused causes should exist.

Therefore, I propose to turn these messages into errmsg_internal(), so
that we do not translate them.  They could even be an elog() and ditch
the errcode, but I see no reason to go that far.  Or we could make them
ERRCODE_DATA_CORRUPTED.


BTW, the aforementioned commit actually appeared in v13, and I
translated the message there at the time.  The reason I noticed this now
is that the %d was changed to %p by commit c4649cce39a4, and it was that
change that triggered me now.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Small aircraft do not crash frequently ... usually only once!"
                                  (ponder, http://thedailywtf.com/)



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Discussion: psql \et -> edit the trigger function
Next
From: Andres Freund
Date:
Subject: Re: BUG: Postgres 14 + vacuum_defer_cleanup_age + FOR UPDATE + UPDATE