de-catalog one error message

Started by Alvaro Herreraalmost 3 years ago3 messageshackers
Jump to latest
#1Alvaro Herrera
alvherre@2ndquadrant.com

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/)

#2Daniel Gustafsson
daniel@yesql.se
In reply to: Alvaro Herrera (#1)
Re: de-catalog one error message

On 10 May 2023, at 19:54, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:

..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.

AFAICT from following the code that seems correct, and I agree with removing
them from translation to lessen the burden on our translators.

--
Daniel Gustafsson

#3Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Daniel Gustafsson (#2)
Re: de-catalog one error message

On 2023-May-11, Daniel Gustafsson wrote:

On 10 May 2023, at 19:54, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:

Therefore, I propose to turn these messages into errmsg_internal(), so
that we do not translate them.

AFAICT from following the code that seems correct, and I agree with removing
them from translation to lessen the burden on our translators.

Thanks for looking! Pushed now.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"Pido que me den el Nobel por razones humanitarias" (Nicanor Parra)