Re: Upgrading databases - Mailing list pgsql-interfaces

From Kevin Kempter
Subject Re: Upgrading databases
Date
Msg-id 200911111151.42131.kevink@consistentstate.com
Whole thread Raw
In response to Upgrading databases  (Mark Richardson <markmapo@yahoo.com>)
List 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.


pgsql-interfaces by date:

Previous
From: Mark Richardson
Date:
Subject: Upgrading databases
Next
From: Bosco Rama
Date:
Subject: Re: Upgrading databases