Re: FATAL: catalog is missing 1 attribute(s) for relid 16396 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: FATAL: catalog is missing 1 attribute(s) for relid 16396
Date
Msg-id 19456.1105676252@sss.pgh.pa.us
Whole thread Raw
In response to FATAL: catalog is missing 1 attribute(s) for relid 16396  ("Marc G. Fournier" <scrappy@postgresql.org>)
Responses Re: FATAL: catalog is missing 1 attribute(s) for relid
Re: FATAL: catalog is missing 1 attribute(s) for relid
List pgsql-hackers
"Marc G. Fournier" <scrappy@postgresql.org> writes:
> What the client did was a 'delete from pg_attribute where ... ' ...

[ blink... ]  Well, that sort of thing is definitely a candidate for the
Darwin Award, but what exactly was the WHERE clause?

> The database is a 7.4.2 one ... my first thought was one of the older 
> standbys ... rebuild the schema and move the data files into place over 
> top of that ... but of course, 7.3 and beyond are OID based vs name based 
> files, so that doesn't work, unless there is some way of figuring out 
> which file in the old directory corresponds to while oid-file, and without 
> beign able to get into the database to read the system files, thats a wee 
> bit difficult ...

I think that people have once or twice gotten themselves out of that
but it ain't easy.  Give us full details.

> I'm still searching the 'net to see if there is somethign that I've 
> overlooked ... but everything so far is drawing a deadend ... can someone 
> suggest a web page I should read, a tool I could use, or something, to get 
> the data out of this, that I'm not finding?  Or some way of 'fixing' relid 
> 16396? :)

[ select 16396::regclass... ] pg_am?  You may be in luck, because that
is the one solitary system catalog that no one ever changes.  If that's
all that got hit you might have a chance.  What I'm wondering is just
exactly what the extent of the damage was.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Has anybody tried porting PostgreSQL to a "stack machine"
Next
From: Kris Jurka
Date:
Subject: Re: Top-k optimizations?