Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqN42-00061X-9J for pgsql-admin@arkaria.postgresql.org; Tue, 21 Mar 2017 16:55:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cqN41-0000Dh-QZ for pgsql-admin@arkaria.postgresql.org; Tue, 21 Mar 2017 16:55:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cqN41-0000CW-4V for pgsql-admin@postgresql.org; Tue, 21 Mar 2017 16:55:17 +0000 Received: from tamriel.snowman.net ([72.66.115.51]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqN3x-0006GF-8q for pgsql-admin@postgresql.org; Tue, 21 Mar 2017 16:55:16 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 8E4905F794; Tue, 21 Mar 2017 12:54:42 -0400 (EDT) Date: Tue, 21 Mar 2017 12:54:42 -0400 From: Stephen Frost To: "David G. Johnston" Cc: Thorsten =?iso-8859-1?Q?Sch=F6ning?= , "pgsql-admin@postgresql.org" Subject: Re: upgrade path from PG 8.3 to PG 9.5 Message-ID: <20170321165442.GO9812@tamriel.snowman.net> References: <58AF1E37.90309@nrc-cnrc.gc.ca> <722763388.20170321172524@am-soft.de> <20170321164049.GN9812@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hGx25MuB4LWC1yl9" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 12:50:03 up 255 days, 18:14, 22 users, load average: 0.02, 0.07, 0.11 User-Agent: Mutt/1.5.21 (2010-09-15) 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 --hGx25MuB4LWC1yl9 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * David G. Johnston (david.g.johnston@gmail.com) wrote: > On Tue, Mar 21, 2017 at 9:40 AM, Stephen Frost wrote: > > * Thorsten Sch=F6ning (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. Thanks! Stephen --hGx25MuB4LWC1yl9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJY0VrSAAoJEO1sijiDR2RVbksP/1JL0u6sLSRdS9em5IFR5+s6 l3fKeU8MWmaH8ABe/Xi5lxWdwTd8+aY/lGENwLWotSFBFDPWRD8t6VX4P63rioli UAxcWXamkP0qD5ndd7344XoemQ2AHS/dXyAvXSdd0bsuvPSHeqNox8I0LsV6ceQF ETfTsuSYQyrEStULApJw8tUlwRTtZOPYKDeOTt+JSVxDujUarLXWJp015b+BL6tl opoZfEwDaM4URqS8FrFinwOTtr6rUUvIBxKVf4gaTrDzFTojcjvmNSbwwjm0chcr 0KgDS8R3qw1NEMP8rqG4RVoFK7gO/wY+tMAx4iSmLYxloMFlps0lRUMV1WKly/eu Cr3McHd36wyFvO1rbqoAOWUqa1K8v1bNkoMd/F7UGvYrd+kz3E5Oizj0CdDPzlQc 6FLE1n6afhpJQcFfrwgDkoWRgILdJhSM+pWhW3oFII6XlPNCvmAbPb0gQUdsIYCI /axILIvs5B6t2tlvk/T306yihcNrQ2wjRsVZdw/WE+7aITk5BDM5XxNK2UiYY/K0 IaXc2IX8cnbL5LkVnwsCT/pI/kx2YWIH1BBAUMDXiyIsn0KqFfU6XjPadHG+ZRuV 5TejQvyYyV+rELLghjI58kuhzQTO3cqGM/sLcjmRWvUASRcZreY+oFTQhXnTuCmD vJZVQaE2scAwXtsgDIVT =5NQw -----END PGP SIGNATURE----- --hGx25MuB4LWC1yl9--