From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-admin@postgresql.org
Subject: Re: Upgrade to new version
Date: Tue, 22 Oct 2002 11:04:45 -0400
Message-ID: <20021022110445.H4016@mail.libertyrms.com> (raw)
In-Reply-To: <3DA53046.8080007@wettzell.ifag.de>
References: <3DA53046.8080007@wettzell.ifag.de>
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@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: andrew@libertyrms.info
Subject: Re: Upgrade to new version
In-Reply-To: <20021022110445.H4016@mail.libertyrms.com>
References: <3DA53046.8080007@wettzell.ifag.de> <20021022110445.H4016@mail.libertyrms.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox