Re: Better HINT message for "unexpected data beyond EOF"
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Jakub Wartak <jakub.wartak@enterprisedb.com>, Christoph Berg <myon@debian.org>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-04-01T13:59:01Z
Lists: pgsql-hackers
Hi, On 2025-04-01 09:49:12 -0400, Robert Haas wrote: > On Tue, Apr 1, 2025 at 7:13 AM Jakub Wartak > <jakub.wartak@enterprisedb.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? FWIW, I think these are all just about equally wrong. 1) doesn't allow the use to understand what could be the culprit 2*) omit that zero_damaged_pages can cause this due to the logic in mdreadv() > > 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. I'd certainly not backpatch. Greetings, Andres Freund
Commits
-
Remove misleading hint for "unexpected data beyond EOF" error.
- d5b9b2d40262 19 (unreleased) landed
-
md: Add comment & assert to buffer-zeroing path in md[start]readv()
- 00066aa1733d 18.0 cited