Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqaOe-0005Gd-Ak for pgsql-admin@arkaria.postgresql.org; Wed, 22 Mar 2017 07:09:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cqaOd-0002JD-Tq for pgsql-admin@arkaria.postgresql.org; Wed, 22 Mar 2017 07:09:27 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cqaOd-0002J4-G6 for pgsql-admin@postgresql.org; Wed, 22 Mar 2017 07:09:27 +0000 Received: from host3.dynacom.ondsl.gr ([62.103.35.211] helo=smadev.internal.net) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cqaOZ-0001Fz-FH for pgsql-admin@postgresql.org; Wed, 22 Mar 2017 07:09:26 +0000 Received: from smadev.internal.net (smadev [10.9.200.131]) by smadev.internal.net (8.15.2/8.15.2) with ESMTP id v2M79FmA005398 for ; Wed, 22 Mar 2017 09:09:16 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) Subject: Re: upgrade path from PG 8.3 to PG 9.5 To: pgsql-admin@postgresql.org References: <58AF1E37.90309@nrc-cnrc.gc.ca> <722763388.20170321172524@am-soft.de> <20170321164049.GN9812@tamriel.snowman.net> <20170321165442.GO9812@tamriel.snowman.net> From: Achilleas Mantzios Message-ID: <58D2231B.8050405@matrix.gatewaynet.com> Date: Wed, 22 Mar 2017 09:09:15 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On 21/03/2017 21:00, Scott Marlowe wrote: > On Tue, Mar 21, 2017 at 10:54 AM, Stephen Frost wrote: >> Greetings, >> >> * David G. Johnston (david.g.johnston@gmail.com) wrote: >>> On Tue, Mar 21, 2017 at 9:40 AM, Stephen Frost wrote: >>>> * Thorsten Schöning (tschoening@am-soft.de) wrote: >>>>> Guten Tag Keith, >>>>> am Donnerstag, 23. Februar 2017 um 18:57 schrieben Sie: >>>>> >>>>>> You can go directly from 8.3 to 9.5. Just be sure and use the >>>>>> pg_dump from 9.5 to generate the dump file from 8.3. >>>>> Is there a specific reason for that? My current approach for upgrades >>>>> was dumping the old database using the old pg_dump, uninstalling the >>>>> old Postgres, installing the new one and restore from the old dump. >>>> Yes. Using the older pg_dump may result in dumps that can't be restored >>>> into the newer version of PG because things like keywords have been >>>> added and must now be quoted. There are possibly other things that have >>>> been changed between the old version and the new one which would also >>>> require the new pg_dump to be used, but keywords are the big one. >>> The proper solution to the keyword/identifier quoting problem is to use >>> "--quote-all-identifiers". >> Using the version of pg_dump to which you are upgrading is an entirely >> supported and 'proper' approach to dealing with that issue. Using >> --quote-all-identifiers, in my opinion anyway, leads to rather ugly >> results. >> >> As I also mention, there are other things in newer versions that pg_dump >> does its best to address (including things like checking for role names >> in older versions starting with "pg_", which is not allowed in 9.6+). >> Using the pg_dump from the version of PG to which you are upgrading is >> the correct and supported approach to doing upgrades. Using >> --quote-all-identifiers is not. > Yeah there are plenty of little road bumps to hit especially when > going from something as old as 8.3 to 9.5. emcoding issues pop up etc > etc. > > Using the new version to dump is THE way to go if you are gonna dump restore. > > IF you need the minimal amount of downtime possible, the only > reasonable solution is some form of logical replication like slony or > longdiste etc. We used pg_upgrade recently for migrating from 8.3 -> 9.4 (the last version which supports 8.3), and it went nice. We had some custom functions in C, and pg_upgrade is a disciplined way to deal with the migration. We will deploy this migration procedure to over 100 servers running 8.3. > According to this page: http://slony.info/documentation/requirements.html > > slony 2.2.5 supports versions from 8.3 to 9.5 so you can upgrade from > one to the other in one fell swoop and your downtime will be measured > in seconds, or minutes at most. I suggest create a pair of test > servers running 8.3 and 9.5 to test the migration on ahead of time. > If you don't need to keep downtime to a minimum dump/restore is WAY > easier and you can do a test run while the main server is running just > by taking a backup and see if it restores cleanly and properly to the > new 9.5 machine. If you do want minimal downtime, learning slony or > some other logical replication system is worth your time. Slony docs > have a fairly old but still mostly accurate how to page here: > http://slony.info/documentation/1.2/versionupgrade.html > -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin