X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 79A203B497E for ; Wed, 15 Dec 2004 16:20:11 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 92172-05 for ; Wed, 15 Dec 2004 16:20:03 +0000 (GMT) Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id 998EB3B4967 for ; Wed, 15 Dec 2004 16:20:02 +0000 (GMT) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 15 Dec 2004 10:20:00 -0600 Subject: Re: upgrading postgresql From: Scott Marlowe To: Tsirkin Evgeny Cc: pgsql-admin@postgresql.org In-Reply-To: <41C00963.7090904@mail.jct.ac.il> References: <41C00963.7090904@mail.jct.ac.il> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1103127600.22049.40.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 15 Dec 2004 10:20:00 -0600 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200412/142 X-Sequence-Number: 15728 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.