Re: upgrade path from PG 8.3 to PG 9.5

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Thorsten Schöning <tschoening(at)am-soft(dot)de>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: upgrade path from PG 8.3 to PG 9.5
Date: 2017-03-21 16:40:49
Message-ID: 20170321164049.GN9812@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Greetings,

* Thorsten Schöning (tschoening(at)am-soft(dot)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.

> That way I didn't accidently mix-up installations or use wrong tools
> or such.

Having a good, clean, way to install and handle multiple versions
concurrently is valuable not just for pg_dump but also for pg_upgrade
and just generally a good thing. The PGDG RPM packages do an alright
job of this, and the Debian packaging is quite good at handling it.

> Did pg_dump have bugs in the past which resulted in pg_restore not
> being able to read the dumps?

This isn't generally an issue, but what goes into the dump file is
straight SQL for things like creating tables and such; pg_restore does
not do anything for dealing with keyword changes or anything like that.

Thanks!

Stephen

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2017-03-21 16:47:11 Re: upgrade path from PG 8.3 to PG 9.5
Previous Message Thorsten Schöning 2017-03-21 16:25:24 Re: upgrade path from PG 8.3 to PG 9.5