Better HINT message for "unexpected data beyond EOF" - Mailing list pgsql-hackers

From Jakub Wartak
Subject Better HINT message for "unexpected data beyond EOF"
Date
Msg-id CAKZiRmxNbcaL76x=09Sxf7aUmrRQJBf8drzDdUHo+j9_eM+VMg@mail.gmail.com
Whole thread Raw
Responses Re: Better HINT message for "unexpected data beyond EOF"
List pgsql-hackers
I would like to propose that we tweak the following error message:

ERROR:  unexpected data beyond EOF in block 1472 of relation base/5/16387
HINT:  This has been seen to occur with buggy kernels; consider
updating your system.

to something more generic and less confusing. It is coming from
ffae5cc5a602 (2006), and we are probably not running those "buggy"
kernels anywhere. I've seen this error multiple times, but it is
usually due to some external influence overwriting/replacing the files
in PGDATA and some (potentially new) backends open()ing those "new"
files and finding unexpected file layout. In the real world this means
usually:
a. files being potentially accidentally replaced/overwritten, please
see attached file for reproducer
b. some obscure bugs (e.g. in EPAS - PG fork - we have on-demand
automatic partition creation and we had bug/race conditions where
multiple backends end up writing to the same relfilenode oid file)

so how about:
-HINT:  This has been seen to occur with buggy kernels; consider
updating your system.
+HINT:  This has been observed with files being overwritten, buggy
kernels and potentially other external file system influence.

?

-J.

Attachment

pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Windows: openssl & gssapi dislike each other
Next
From: Daniel Gustafsson
Date:
Subject: Re: Possibly hard-to-read message