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

From: Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>
To: Christoph Berg <myon(at)debian(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, 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 11:13:43
Message-ID: CAKZiRmzgXYfm0JOFMaQ6Z4WCh5ZdRWqim68jf860S3718OAQoA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 27, 2025 at 4:00 PM Christoph Berg <myon(at)debian(dot)org> wrote:
>
> Re: Robert Haas
> > I think that would be better than what we have now, but I still wonder
> > if we should give some kind of a hint that an external process may be
> > doing something to that file. Jakub and I may be biased by having just
> > seen a case of exactly that in the field, but I wonder now how many
> > 'data beyond EOF' messages are exactly that -- and it's not like the
> > user is going to guess that 'data beyond EOF' might mean that such a
> > thing occurred.
>
> HINT: Did anything besides PostgreSQL touch that file?

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?

Anything else? #1 has one advantage that we don't need to provide 11
translations inside src/backend/po/*.po (I could use google translate
when proposing patch, but I do not take any responsibility for what it
generates ;))

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

-J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2025-04-01 11:20:55 Re: Using read stream in autoprewarm
Previous Message Zhijie Hou (Fujitsu) 2025-04-01 10:58:24 RE: Fix slot synchronization with two_phase decoding enabled