Postgresql – Incorrect checksum during recovery PostgreSQL database (32bits) from a backup on Mac Os X 64 bits

mac-osxpostgresql

When I try to recover PostgreSQL database from a backup saved under my old version of Mac Os X 10.5 (32bits) on my new version 10.6 (64bits), I have this error :

# sudo -u postgres /opt/local/lib/postgresql82/bin/postgres -D defaultdb_backup
FATAL:  incorrect checksum in control file

This was due to the one server running a 32 bit version and the other one running a 64 bit.

How do I recover my old data ?

Best Answer

Install somewhere postgres in exactly the same version as before, on same architecture, compiles with the same options, then you can recover. doing backups by writing wal segments and/or copying data directory is not really portable.