Thread: 32-bit to 64-bit migration screwup

32-bit to 64-bit migration screwup

From
"David Young"
Date:
All,
 
I was hoping someone can help me fix a big blunder.  I recently bought a new system to replace the old one.  The new system is running 64bit linux and the old one 32bit.  I installed PG 64-bit and tried to bring the old database back up.  Even though I'm running the same version of PG, it is giving me an error when I try to start it back up.  below is the message from pgstartup.log.  It looks like it doesn't recognize the control file anymore.
 
Am I screwed?  I don't have the old system anymore and I didn't do a dump.  I figure if I'm running the same version of PG, the data will come back up correctly.  If someone can help me out of this jam, I would greatly appreciate it.
 
Thanks,
David
 
------------------pgstartup.log---------------

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.

fixing permissions on existing directory /var/lib/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 24MB/153600
creating configuration files ... ok
creating template1 database in /var/lib/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

Success. You can now start the database server using:

    /usr/bin/postgres -D /var/lib/pgsql/data
or
    /usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start

LOG:  logger shutting down
LOG:  logger shutting down
LOG:  logger shutting down
LOG:  logger shutting down
LOG:  logger shutting down
FATAL:  incorrect checksum in control file
FATAL:  incorrect checksum in control file
FATAL:  incorrect checksum in control file

Re: 32-bit to 64-bit migration screwup

From
"Phillip Smith"
Date:

I’m assuming you’ve made a jump in database version – ie, 7.4 to 8.2 or similar…

 

You need to use initdb to create new database files, then pg_dumpall on the old system to dump the data out of the old before importing to the new. Make sure you use pg_dumpall from the new version to dump the data from the old database.

 

-----Original Message-----
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of David Young
Sent: Friday, 26 October 2007 15:52
To: pgsql-admin@postgresql.org
Subject: [ADMIN] 32-bit to 64-bit migration screwup

 

All,

 

I was hoping someone can help me fix a big blunder.  I recently bought a new system to replace the old one.  The new system is running 64bit linux and the old one 32bit.  I installed PG 64-bit and tried to bring the old database back up.  Even though I'm running the same version of PG, it is giving me an error when I try to start it back up.  below is the message from pgstartup.log.  It looks like it doesn't recognize the control file anymore.

 

Am I screwed?  I don't have the old system anymore and I didn't do a dump.  I figure if I'm running the same version of PG, the data will come back up correctly.  If someone can help me out of this jam, I would greatly appreciate it.

 

Thanks,

David

 

------------------pgstartup.log---------------

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.

fixing permissions on existing directory /var/lib/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 24MB/153600
creating configuration files ... ok
creating template1 database in /var/lib/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

Success. You can now start the database server using:

    /usr/bin/postgres -D /var/lib/pgsql/data
or
    /usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start

LOG:  logger shutting down
LOG:  logger shutting down
LOG:  logger shutting down
LOG:  logger shutting down
LOG:  logger shutting down
FATAL:  incorrect checksum in control file
FATAL:  incorrect checksum in control file
FATAL:  incorrect checksum in control file


THINK BEFORE YOU PRINT - Save paper if you don't really need to print this e-mail.

*******************Confidentiality and Privilege Notice*******************

The material contained in this message is privileged and confidential to the addressee. If you are not the addressee indicated in this message or responsible for delivery of the message to such person, you may not copy or deliver this message to anyone, and you should destroy it and kindly notify the sender by reply email.

Information in this message that does not relate to the official business of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta. Weatherbeeta, its employees, contractors or associates shall not be liable for direct, indirect or consequential loss arising from transmission of this message or any attachments

Re: 32-bit to 64-bit migration screwup

From
Devrim GÜNDÜZ
Date:
Hi,

On Thu, 2007-10-25 at 22:52 -0700, David Young wrote:
> FATAL:  incorrect checksum in control file

Did you move the old data files to the new server? If so, it won't work.
Dump your 32-bit database with 32-bit binaries, and load that data to
your 64-bit database.

Regards,
--
Devrim GÜNDÜZ
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/



Attachment

Re: 32-bit to 64-bit migration screwup

From
"Dawid Kuroczko"
Date:
On 10/26/07, Devrim GÜNDÜZ <devrim@commandprompt.com> wrote:
> Hi,
>
> On Thu, 2007-10-25 at 22:52 -0700, David Young wrote:
> > FATAL:  incorrect checksum in control file
>
> Did you move the old data files to the new server? If so, it won't work.
> Dump your 32-bit database with 32-bit binaries, and load that data to
> your 64-bit database.

Not necessarily-- you can run old, 32bit environment under 64bit kernel
(if you enabled 32-bit compatibility in kernel).  Just run your old environment
in chroot.

I have recently did such a migration (old 32bit system in chroot, pg_dump,
pipe to psql on new system).

   Regards,
     Dawid