Thread: Lost main database directory but not tablespace holding the database - how to recover?

My main disk for Postgresql crashed but I still have the database as it was
stored on a tablespace on another disk. Now the problem is how to recover from
this situation.

What I have tried is to restore the database from a backup from a few houres
before the crash and then replacing the directory within the pgsql-data/base
directory holding the database with the version of the database from the
uncorrupted disk. When I try to access the database I get

ERROR:  could not access status of transaction 1827968
DETAIL:  could not open file "/home/software/postgres/DATA/pg_clog/0001": No
such file or directory

How can I solve this inconsistency and recover the database? :)

Thanks!

Geir.


-------------------------------------------------------------------------
Start.no tilbyr nå raskere bredbånd til lavere pris.
Sjekk http://www.start.no/bredband/ for mer informasjon