Re: corrupt DB recovery

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Drew Whittle <drew(at)albatross(dot)co(dot)nz>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: corrupt DB recovery
Date: 2004-08-12 04:21:58
Message-ID: 24307.1092284518@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Drew Whittle <drew(at)albatross(dot)co(dot)nz> writes:
> I have two other db's that are 100% identical in everything but name and
> data. (ie same structure etc), is it possible to use one of that data
> files in them to over write the buggered file and fix the pg_proc error?

You could try that, but unless the db's also have identical history (in
the sense of the same set of transaction numbers that committed) it's
unlikely to work. I think your problem is not that pg_class is buggered
per se, so much as that you did not have correct pg_clog data to match it.
The data files and the log files are an interlocking whole, you can't
just plug in one part at random.

> Any other suggestions that might get the data back or should I just
> forget it and tell them to key it again?

If you did extract something from this mess, how much could you trust
it? Not a lot, because the bad-clog problem will affect visibility of
rows in the user tables too.

I'm afraid you're screwed :-(. Maybe you could learn something about
proper backup procedures though. The backup you have obviously didn't
work well --- how did you take it exactly?

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Drew Whittle 2004-08-12 04:43:01 Re: corrupt DB recovery
Previous Message Drew Whittle 2004-08-12 03:10:16 corrupt DB recovery