Re: Better HINT message for "unexpected data beyond EOF"

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>
Cc: Christoph Berg <myon(at)debian(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Better HINT message for "unexpected data beyond EOF"
Date: 2025-04-01 13:49:12
Message-ID: CA+TgmoZ_A_pGvv+2LRoMzOnQVi7W_iJqP3WaGMDS3_umaXDp_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 1, 2025 at 7:13 AM Jakub Wartak
<jakub(dot)wartak(at)enterprisedb(dot)com> wrote:
> Thread bump. So we have the following candidates:
>
> 1. remove it as Andres stated:
> ERROR: unexpected data beyond EOF in block 1472 of relation base/5/16387
>
> 2a. Robert's idea
> ERROR: unexpected data beyond EOF in block 1472 of relation base/5/16387
> HINT: This has been observed with PostgreSQL files being overwritten.
>
> 2b. Christoph's idea
> ERROR: unexpected data beyond EOF in block 1472 of relation base/5/16387
> HINT: Did anything besides PostgreSQL touch that file?

I don't think I proposed that exact phrasing - I prefer (2b) over
(2a), although I would replace "besides" with "other than".

> Another question is should we back-patch this? I believe we should (?)

I don't think this qualifies as a bug. The current wording isn't
factually wrong, just unhelpful. Even if it were wrong, we need a
pretty good reason to change message strings in a stable branch,
because that can break things for users who are grepping for the
current string (or a translation thereof). If an overwhelming
consensus in favor of back-patching emerges, fine, but my gut feeling
is that back-patching will make more people sad than it makes happy.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2025-04-01 13:52:27 Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query).
Previous Message Daniel Gustafsson 2025-04-01 13:47:59 Re: pgsql: Add support for OAUTHBEARER SASL mechanism