de-catalog one error message

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: de-catalog one error message
Date: 2023-05-10 17:54:07
Message-ID: 20230510175407.dwa5v477pw62ikyx@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-05-10 18:04:08 Re: BUG: Postgres 14 + vacuum_defer_cleanup_age + FOR UPDATE + UPDATE
Previous Message Tom Lane 2023-05-10 17:33:35 Re: Discussion: psql \et <trigger_name> -> edit the trigger function