I've got a Postgres database that crashed (as well as the disk) and suffered some data errors (per http://serverfault.com/questions/156152/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.
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?