Re: Upgrading databases

From: Kevin Kempter <kevink(at)consistentstate(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Upgrading databases
Date: 2009-11-11 18:51:42
Message-ID: 200911111151.42131.kevink@consistentstate.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces

On Wednesday 11 November 2009 11:38:31 Mark Richardson wrote:
> Sorry if this is in the wrong list, but this is the closest I could find...
>
> I have a 8.2.4 database and I installed 8.3.7 and tried using the same
> /pgsql/data/base directory and got an error about incompatiblity.
> The database currently has billions of records but it's sparsely
> populated. It took about 4 months to just populate the original database
> and I REALLY don't want to do that again.
> Is there a conversion routine to change the files themselves? I know I can
> dump and reload - but that takes large disk space and time. Any other way
> around?
> Thanks,
> Mark
>

It's common to use SLONY to do this:

1) install 8.3.7 and create a DDL only dump of the 8.2.4 db and install it
into the new 8.3.7 system data dir (so maybe the 8.2 cluster lived in
/var/lib/pgsql/data and the 8.3 cluster lives in /var/lib/pgsql/8.3/data)

2) setup SLONY and replicate all tables and sequences from the 8.2 cluster
into the 8.3 cluster

3) once the db's are completely in sync, remove slony , drop (or at least
shut down) the 8.2 cluster, and move the users to the new cluster.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bosco Rama 2009-11-11 18:58:43 Re: Upgrading databases
Previous Message Mark Richardson 2009-11-11 18:38:31 Upgrading databases

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bosco Rama 2009-11-11 18:58:43 Re: Upgrading databases
Previous Message Mark Richardson 2009-11-11 18:38:31 Upgrading databases