Re: Upgrade to new version

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Upgrade to new version
Date: 2002-10-22 15:04:45
Message-ID: 20021022110445.H4016@mail.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Oct 10, 2002 at 09:46:14AM +0200, Reiner Dassing wrote:
> Hello all!
>
> I would like to ask what would be the best procedure to upgrade to a
> new version of PostgreSQL in a production system when there is a 'initdb'
> necessary?
>
> Situation:
> We are running PostgreSQL in a production system. There are about 1000
> selects and about 100 inserts per minute.

If you're upgrading to 7.2.3 from 7.2.2, no initdb is required. But
anyway, here's a general strategy:

If you are using replication (and if not, this might be a good time
to start looking at it), you can use it to minimise downtime. Here's
how:

1. Add an additional replication target. Put up the new back
end on another port, and start replicating into it.

2. When you are totally caught up (i.e. replication is merely
sending in its most recent changes in each cycle), shut off the
applications.

3. Reconfigure your client applications to use the new back end.

4. Check that replication has really caught up. Shut off the
old back end (for safety).

5. Re-start your applications.

I've done this. It works. You still have to shut off for a brief
period, but it's minutes, and not hours.

A

--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Igor Georgiev 2002-10-22 15:05:38 Security question : Database access control
Previous Message JOE 2002-10-22 14:37:07 Help with error message