Thread: incorrect checksum in control file

incorrect checksum in control file

From
"Jeffrey W. Baker"
Date:
Today I tried to move a database and got this error, which I gather is
very rare (also undocumented):

postgres[2767]: [1-1] FATAL:  incorrect checksum in control file

I moved the database from a 32-bit arch to a 64-bit arch.  All I did was
shutdown a 7.4.1 database, shutdown the machine, swap the storage onto
the 64-bit machine running 7.4.5, and try to restart.  No dice.

Any suggestions?  I copied the entire $PGDATA tree, reinitialized, and
restored from a dump.

-jwb

Re: incorrect checksum in control file

From
Tom Lane
Date:
"Jeffrey W. Baker" <jwbaker@acm.org> writes:
> I moved the database from a 32-bit arch to a 64-bit arch.  All I did was
> shutdown a 7.4.1 database, shutdown the machine, swap the storage onto
> the 64-bit machine running 7.4.5, and try to restart.  No dice.

You're fortunate that it died that quickly, rather than corrupting your
data in weird and wonderful ways.  Postgres has never been designed to
have architecture-independent data files.

            regards, tom lane

Re: incorrect checksum in control file

From
Ian Turner
Date:
On Thursday, September 09, 2004 11:36:52 PM Tom Lane wrote:
> "Jeffrey W. Baker" <jwbaker@acm.org> writes:
> > I moved the database from a 32-bit arch to a 64-bit arch.  All I did was
> > shutdown a 7.4.1 database, shutdown the machine, swap the storage onto
> > the 64-bit machine running 7.4.5, and try to restart.  No dice.
>
> You're fortunate that it died that quickly, rather than corrupting your
> data in weird and wonderful ways.  Postgres has never been designed to
> have architecture-independent data files.

Any suggestions on how to recover a database from binary files when the
previous hardware is no longer around?

--Ian


Re: incorrect checksum in control file

From
Tom Lane
Date:
Ian Turner <vectro@vectro.org> writes:
> On Thursday, September 09, 2004 11:36:52 PM Tom Lane wrote:
>> "Jeffrey W. Baker" <jwbaker@acm.org> writes:
>>> I moved the database from a 32-bit arch to a 64-bit arch.  All I did was
>>> shutdown a 7.4.1 database, shutdown the machine, swap the storage onto
>>> the 64-bit machine running 7.4.5, and try to restart.  No dice.

>> You're fortunate that it died that quickly, rather than corrupting your
>> data in weird and wonderful ways.  Postgres has never been designed to
>> have architecture-independent data files.

> Any suggestions on how to recover a database from binary files when the
> previous hardware is no longer around?

Install 32-bit Postgres executables.  I'm not aware of any 64-bit
hardware that isn't able to run code built for its 32-bit predecessor.
(You might then wish to dump and reload into a 64-bit installation, but
whether you do or not, that's the next step.)

            regards, tom lane


Re: incorrect checksum in control file

From
Ian Turner
Date:
On Saturday, July 06, 2013 11:39:19 PM Tom Lane wrote:
> Install 32-bit Postgres executables.  I'm not aware of any 64-bit
> hardware that isn't able to run code built for its 32-bit predecessor.
> (You might then wish to dump and reload into a 64-bit installation, but
> whether you do or not, that's the next step.)

OK, thanks for the advice. Rather than fuss with cross-compiling, I guess I
can set up a 32-bit virtual machine and run from there.

--Ian