Skip site navigation (1) Skip section navigation (2)

Re: upgrading postgresql

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Tsirkin Evgeny <tsurkin(at)mail(dot)jct(dot)ac(dot)il>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: upgrading postgresql
Date: 2004-12-15 16:20:00
Message-ID: 1103127600.22049.40.camel@state.g2switchworks.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Wed, 2004-12-15 at 03:52, Tsirkin Evgeny wrote:
> Hi all!
> We are currently running a 7.3.4 backed and planning to upgrade.
> However we can't do to much/at all changes in the applications using the db.
> So the question is to what version to upgrade :
> what is the best release from the 7.3.* ?
> would the upgrade to 7.4.* require serious changes in the applications , 
> if not what is the
> best release of the 7.4.*?

The best version of any major release is the latest minor version.  As
of this writing, the latest minor version of the 7.3 branch is 7.3.8,
and the latest minor version of the 7.4 branch is 7.4.6.

Upgrades from one minor version to another (i.e. 7.3.4 to 7.3.8) are
usually painless and simple:

-- Always backup ahead of time just in case.
-- Stop the server.
-- Upgrade PostgreSQL.
-- Start server.

No changes to client side apps should be necessary.

For upgrades from one major version to the next, you'll need to:

-- pg_dump all databases in the cluster.  (optionally, also backup the
files in the $PGDATA directory)
-- Clean out the $PGDATA directory (keep a copy of your pg_hba.conf and
postgresql.conf for reference)
-- Uninstall old version of PostgreSQL
-- Install new version of PostgreSQL
-- initdb with the proper locale
-- edit your pg_hba.conf and postgresql.conf
-- start database
-- restore from backups.

I'd recommend a test run of the major upgrade procedures you're planning
on doing on a backup machine in case you run into some problems.  Use of
a replication engine, like Slony as well as pgpool can allow you to
seamlessly upgrade your installation while it stays online.  I'd
practice this too on a backup system before going after the live
servers.

In response to

Responses

pgsql-admin by date

Next:From: Michael FuhrDate: 2004-12-15 16:20:46
Subject: Re: upgrading postgresql
Previous:From: Richard HuxtonDate: 2004-12-15 16:17:51
Subject: Re: [SQL] [Fwd: Majordomo results: unsubscribe]

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group