Re: Upgrading PostgreSQL 7.1.3 - Mailing list pgsql-general

From Michal Taborsky
Subject Re: Upgrading PostgreSQL 7.1.3
Date
Msg-id 412C4826.30104@taborsky.cz
Whole thread Raw
In response to Upgrading PostgreSQL 7.1.3  ("ruben20@superguai.com" <ruben20@superguai.com>)
Responses Re: Upgrading PostgreSQL 7.1.3  (Frank Finner <postgresql@finner.de>)
List pgsql-general
ruben20@superguai.com wrote:
> What is the most advisable version I should upgrade to? My top goal is
> reliability. Do I have to install/reinstall or upgrade? Do I need to be
> concerned of any special feature when dumping/restoring data? Is there
> any good doc about this?

Go for the latest stable version (currently 7.4.5). Make backups! (More
than one preferably.) My suggestion is to install the new version
alongside the old one on the same machine and make it listen on
different port. Then you can do pg_dump from one directed immediately to
the other. If something fails (and it will, several times, before you
get the dump parameters right), you just ditch the new data directory
and start again with fresh initdb. Also make sure you are using tools
from the new version (pg_dump, psql, ...).

You can do this on live system too. Only after you succeed in
transfering the database, recreate the new one one last time, disable
connections to the original server except from pg_dump and perform the
transfer again (so that you make sure no data gets written to the
original database after you started dumping it.) Then switch the
servers, delete the old one and you are good to go with the new version.
Oh, and did I mention you should make backups?

This worked for me. It is a long way from 7.1 to 7.4 so expect some
fiddling with the pg_dump parameters and maybe some sed-ing in between.

Hope this helps.

--
Michal Taborsky
http://www.taborsky.cz


pgsql-general by date:

Previous
From: Ulrich Wisser
Date:
Subject: Missing FROM clause
Next
From: "Magnus Hagander"
Date:
Subject: Re: Missing FROM clause