Hi,
First thing I would've done is to insert the two corrupted rows into
pg_attribute. The best way to get the data for the inserts is to restore a
dump of the DB into empty database and retriever the rows by running select
over pg_attribute in restored DB. Of You have EMS manager for postgres you
can export the selected rows to sql script as inserts. After-hours running
updates on corrupted DB run an update on pg_class.
If you don't have EMS write inserts yourself based on selected rows.
Since it's only 2 rows it will be quick.
Hope this helped You.
Regards
Luke

2011/9/6 marvin.deoliveira <marvin.deolive...@gmail.com>

> --------------------------------------
> | Postgres Version 9.0.2  |
> --------------------------------------
>
> After a Kernel Panic in Debian 5, we found corrupted rows in pg_attribute
> about 2 tables.
>
> I deleted the rows and updated the pg_class.relnatts with the result of:
>
> SELECT count(*) FROM pg_attribute WHERE attnum > 0 AND attrelid = 167017 --
> Returned 22 rows.
> where 167017 is the one of the tables OID.
>
> Now I got the following messages:
>
>  1 - When PgAdmin III list the table structure for the first time:
>
>  ERROR:  invalid attribute number 23 for fase_laudo_apac
>  LINE 1: Select count(*) as rows from only fase_laudo_apac
>
>  2- When I tried to drop the fase_laudo_apac table:
>
>  An error has occourred:
>
>  ERROR: cache lookup failed for attribute 3 of relation 167045
>
>  Any help will be really appreciated
>
>
> -----
> Marcos Oliveira
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/corrupted-rows-in-pg-attribute-deleted-tp4775814p4775814.html
> Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>



-- 
Ɓukasz Brodziak
"Do you bury me when I'm gone
Do you teach me while I'm here
Just as soon I belong
Then it's time I disappear"

Reply via email to