0

I've got a Postgres database that crashed (as well as the disk) and suffered some data errors (per After DB disk failure, now "cache lookup failed for index").

The initial problem seems to be the system tables, as the answer in that question suggests. However it's been impossible to even try to reindex the database.

Trying postgres -P -D datadir dbname yields the same error, FATAL: cache lookup failed for index 2662 - isn't that what the -P flag is supposed to get around?

How do you connect to the database to reindex the database if you can't ignore the system tables? Or is something else going on?

0

In this case, where the -P flag still results in errors, the database is almost certainly beyond (reasonable) recovery.

This:

postgres -O -P -D /data/dir -c log_error_verbosity=verbose dbname

yields additional information. In this instance it meant corruption beyond the pg_class table.

More info on the pgsql-admin list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.