Search Postgresql Archives

Recovering database after disk crash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

A disk hosting an instance of 8.2 crashed on me (hardware failure).  I
was able to pull most of the data off the drive, but the one database
that I need the most is corrupt.  I'm not really sure where to
start... so here are some error messages:

postgres@vsimkus-laptop:/var/log/postgresql$ pg_dump  EPC
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR:  index
"pg_opclass_am_name_nsp_index" contains unexpected zero page at block
0
HINT:  Please REINDEX it.
pg_dump: The command was: SELECT tableoid, oid, *, (SELECT rolname
FROM pg_catalog.pg_roles WHERE oid = '10') as lanowner FROM
pg_language WHERE lanispl ORDER BY oid

postgres@vsimkus-laptop:/var/log/postgresql$ reindexdb EPC
NOTICE:  table "pg_class" was reindexed
reindexdb: reindexing of database "EPC" failed: ERROR:  catalog is
missing 4 attribute(s) for relid 10762

Almost every operation I attempt ends in a similar error message:

EPC=# \dt
ERROR:  index "pg_opclass_am_name_nsp_index" contains unexpected zero
page at block 0
HINT:  Please REINDEX it.

EPC=# select * from siemr_sys.zip_codes;
ERROR:  catalog is missing 10 attribute(s) for relid 1337158

EPC=# select * from siemr_sys.sex_list;
ERROR:  catalog is missing 2 attribute(s) for relid 1337150

EPC=# select * from siemr_data.visits;
ERROR:  catalog is missing 7 attribute(s) for relid 1337095

Is there some way I can extract the data from the tables even if the
metadata is corrupt?

Thanks
Vic

-- 
Men never do evil so completely and cheerfully as when they do it from
religious conviction.

-Blaise Pascal


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux