Thread: Database "template1" does not exist in the system catalog

Database "template1" does not exist in the system catalog

From
"Aaron Mark"
Date:
I apologize if this is a duplicate of a message I just sent.  The message
didn't appear to go through.  I seem to have encountered a major corruption
error.  I am currently running PostgreSQL 7.3.6.  Here is an example of an
error I received:

# psql -h 127.0.0.1 -p 5432 -U postgres template1
psql: FATAL:  Database "template1" does not exist in the system catalog.

In digging around the list, I have tried running pgfsck:

# pgfsck -s 8192 -D /Applications/altona/data-corruption template1
-- Detected database format 7.3
-- Table pg_class(1259):Page 0: Incorrect value in header (incorrect
blocksize?)
-- 00 00 00 00 00 47 A7 CC 00 00 00 09 00 E8 01 5C 20 00 20 01
-- Table pg_class(1259):Page 0: Incorrect value in header (incorrect
blocksize?)
-- 00 00 00 00 00 47 FE CC 00 00 00 09 00 E8 01 58 20 00 20 01
-- Table pg_class(1259):Page 0: Incorrect value in header (incorrect
blocksize?)
-- 00 00 00 00 00 48 35 88 00 00 00 09 00 E8 0E E8 20 00 20 01
Couldn't find class 'pg_attribute'

I'm 99% sure the block size is 8192, but I could be wrong.  I proceeded to
try out pg_filedump on data-corrupt/base/1/1259, but I didn't see anything
out of the ordinary.  Can't say that I know what I was looking for, though.

Any ideas on what I can try to potentially fix this problem and/or recover
any of this data?

Thanks,

Aaron

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/