Re: Query failed: ERROR: catalog is missing 1 attribute(s) for relid 456086 - Mailing list pgsql-general

From Tom Lane
Subject Re: Query failed: ERROR: catalog is missing 1 attribute(s) for relid 456086
Date
Msg-id 11893.1053643226@sss.pgh.pa.us
Whole thread Raw
In response to Query failed: ERROR: catalog is missing 1 attribute(s) for relid 456086  (CSN <cool_screen_name90001@yahoo.com>)
Responses Re: Query failed: ERROR: catalog is missing 1 attribute(s) for relid 456086  (CSN <cool_screen_name90001@yahoo.com>)
List pgsql-general
CSN <cool_screen_name90001@yahoo.com> writes:
> ERROR: catalog is missing 1 attribute(s) for relid
> 456086 . in /var/www/html/lib.php on line 200

Ugh.  This indicates corruption in the system catalogs --- specifically,
a missing pg_attribute row.  These rows will normally be picked up with an
indexscan, so it's possible that pg_attribute itself is fine and the
trouble is corruption in pg_attribute_relid_attnum_index.

> VACUUM gave the same error, but VACUUM FULL appears to
> have fixed whatever the problem was.

Sounds like blind luck to me.  I'd have expected that you *might* escape
alive by reindexing pg_attribute, otherwise you have a big problem.

The only way that an error like that would go away by itself is if it
wasn't really there at all --- that is, the apparent corruption only
existed in in-memory copies of pg_attribute pages, and not on disk at
all.  I'd strongly recommend running some hardware diagnostics
(memtest86, badblocks, etc).  You might not be so lucky with the next
dropped bit.

            regards, tom lane

pgsql-general by date:

Previous
From: "Alexander Goldybin"
Date:
Subject: deadlocks problem
Next
From: Darren Ferguson
Date:
Subject: Re: ILIKE Problem?