Re: Query failed: ERROR: catalog is missing 1 attribute(s) for relid 456086

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: CSN <cool_screen_name90001(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Query failed: ERROR: catalog is missing 1 attribute(s) for relid 456086
Date: 2003-05-22 22:40:26
Message-ID: 11893.1053643226@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

CSN <cool_screen_name90001(at)yahoo(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-05-22 22:53:00 Re: Q: Structured index - which one runs faster?
Previous Message scott.marlowe 2003-05-22 22:23:44 Re: [GENERAL] Q: Structured index - which one runs faster?