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 <[EMAIL PROTECTED]> M2P 2A8 +1 416 646 3304 x110 ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html