Re: Vacuum error message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Raymond McKolay <RMcKolay(at)brittenbanners(dot)com>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Vacuum error message
Date: 2012-08-17 18:47:00
Message-ID: 19779.1345229220@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Raymond McKolay <RMcKolay(at)brittenbanners(dot)com> writes:
> I am new to postgresql and hope this is the correct list to mail to.
> I have a DB that is out of control huge and I tried running a Vacuum on it and received the following error
> Error: could not read block 512591 of relation 1663/16396/16768: Result too large

That's really bizarre --- it apparently means that read() returned
ERANGE, which is not a documented error code for that system call.

What platform are you on, and what filesystem is the database stored on,
and what PG version is this anyway?

If it's OS X, we have heard before of ERANGE occurring on corrupted HFS+
filesystems:
http://archives.postgresql.org/pgsql-hackers/2012-05/msg00745.php
... or at least, we theorized that this was a symptom of filesystem
corruption, but I don't see anything in the thread about whether that
was proven to be true or not.

If it is a filesystem problem, you'd probably get the same error from
(say) attempting to copy that file to someplace else --- I'd suggest
trying that as a first diagnostic experiment.

As for recovery, if you're really lucky this is just a kernel bug that
has been fixed in some more recent kernel ... are you up to date on OS
updates? Otherwise, depending on how widespread the damage is, you
might be forced to revert to your last backups (I hope you have some,
if the data is valuable). But you could try extracting what you can
first. There's information about dealing with data corruption on our
wiki and in our mailing list archives.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Raymond McKolay 2012-08-17 20:35:02 Re: Vacuum error message
Previous Message Kevin Grittner 2012-08-17 18:41:33 Re: Vacuum error message