Re: Fix corrupt pg_toast table?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Clark <codingninja(at)gmail(dot)com>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Fix corrupt pg_toast table?
Date: 2009-07-31 23:18:03
Message-ID: 16653.1249082283@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Michael Clark <codingninja(at)gmail(dot)com> writes:
> On Fri, Jul 31, 2009 at 5:24 PM, Greg Stark <gsstark(at)mit(dot)edu> wrote:
>>> Now I am getting:
>>> ERROR: could not access status of transaction 3839923882

>> How long has this database been in use? That's a very high transaction
>> number that would only be reached on a heavily used database after a
>> reasonably long period of use. If that's not likely than a likely
>> possibility is that your table has been overwritten with garbage.
>> Possibly by a filesystem bug or hardware failure.

> Not really that long. The database was created in early June, and if that
> is supposed to be a transaction count (3839923882), then yeah that seems way
> out there.

It seems certain that you're looking at corrupt data. Trashed data
frequently manifests this way, because the transaction ID is the first
field of tuple headers that the database can cross-check with any
amount of rigor.

At this point we know that at least two unrelated disk blocks have been
clobbered by something (first that index page, and now this). There's
no very good reason to think there are only two :-(. I'd bet at least
a cheese sandwich on hardware problems. Test and fix/replace your
hardware, then go back to your last backup (I hope you've got one).

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Benjamin Krajmalnik 2009-08-01 05:51:12 Re: Error in creating the backend query
Previous Message Michael Clark 2009-07-31 22:57:03 Re: Fix corrupt pg_toast table?