Link to home
Start Free TrialLog in
Avatar of twolines
twolinesFlag for United States of America

asked on

pg_dump error

Trying to backup postgresql db:

# pg_dump -U root dbname -f backup.sql
pg_dump: query to obtain list of casts failed: ERROR:  invalid page header in block 1 of relation "pg_cast"
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

Try re-index the database:
reindexdb -s dbname
Avatar of twolines

ASKER

problem with reindexing:

dbname=# REINDEX TABLE pg_cast;
ERROR:  invalid page header in block 1 of relation "pg_cast"
while, for example:
dbname=# REINDEX TABLE pg_depend;
REINDEX
Sounds like your database has been corrupted due to hardware issue.
Please check the system log of your DB server for the clue (error messages) first.
ASKER CERTIFIED SOLUTION
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial