pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Thorsten Schöning <tschoening@am-soft.de>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: upgrade path from PG 8.3 to PG 9.5
Date: Tue, 21 Mar 2017 12:54:42 -0400
Message-ID: <20170321165442.GO9812@tamriel.snowman.net> (raw)
In-Reply-To: <CAKFQuwbDq=epG8Rph13tRq8rwtg-5NX5NjH7PQPN71RffEGfFQ@mail.gmail.com>
References: <58AF1E37.90309@nrc-cnrc.gc.ca>
	<CAHw75vtP=FPdVeMZE5bWE6_+Mi0RzyXgr7fEAjDCvBmkkMpdcQ@mail.gmail.com>
	<722763388.20170321172524@am-soft.de>
	<20170321164049.GN9812@tamriel.snowman.net>
	<CAKFQuwbDq=epG8Rph13tRq8rwtg-5NX5NjH7PQPN71RffEGfFQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Greetings,

* David G. Johnston (david.g.johnston@gmail.com) wrote:
> On Tue, Mar 21, 2017 at 9:40 AM, Stephen Frost <sfrost@snowman.net> 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.

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (13+ messages)  latest in thread

Message-ID: <20170321165442.GO9812@tamriel.snowman.net>
Permalink:  ../20170321165442.GO9812@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20170321165442.GO9812@tamriel.snowman.net

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: sfrost@snowman.net, david.g.johnston@gmail.com, tschoening@am-soft.de
  Subject: Re: upgrade path from PG 8.3 to PG 9.5
  In-Reply-To: <20170321165442.GO9812@tamriel.snowman.net>

* 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