pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
upgrade path from PG 8.3 to PG 9.5
13+ messages / 9 participants
[nested] [flat]

* upgrade path from PG 8.3 to PG 9.5
@ 2017-02-23 17:39  ghiureai <isabella.ghiurea@nrc-cnrc.gc.ca>
  0 siblings, 2 replies; 13+ messages in thread

From: ghiureai @ 2017-02-23 17:39 UTC (permalink / raw)
  To: pgsql-admin

Hi List,
we still have 2 hosts  running the old PG 8.3  version, we finally 
agreed to move to PG9.5, please advise what will be  the process for 
this upgrade ? the db size  for upgrade is 500GB(  with 4 table spaces 
on # volumes)
( do I need to move first to PG9.0 and next move up?)
Isabella


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: upgrade path from PG 8.3 to PG 9.5
@ 2017-02-23 17:57  Gilberto Castillo <gilberto.castillo@etecsa.cu>
  parent: ghiureai <isabella.ghiurea@nrc-cnrc.gc.ca>
  1 sibling, 0 replies; 13+ messages in thread

From: Gilberto Castillo @ 2017-02-23 17:57 UTC (permalink / raw)
  To: ghiureai <isabella.ghiurea@nrc-cnrc.gc.ca>; +Cc: pgsql-admin


> Hi List,
> we still have 2 hosts  running the old PG 8.3  version, we finally
> agreed to move to PG9.5, please advise what will be  the process for
> this upgrade ? the db size  for upgrade is 500GB(  with 4 table spaces
> on # volumes)
> ( do I need to move first to PG9.0 and next move up?)
> Isabella
>

No, you need.

Use pgupgrade

> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>


-- 
Saludos,
Gilberto Castillo
ETECSA, La Habana, Cuba



-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: upgrade path from PG 8.3 to PG 9.5
@ 2017-02-23 17:57  Keith <keith@keithf4.com>
  parent: ghiureai <isabella.ghiurea@nrc-cnrc.gc.ca>
  1 sibling, 1 reply; 13+ messages in thread

From: Keith @ 2017-02-23 17:57 UTC (permalink / raw)
  To: ghiureai <isabella.ghiurea@nrc-cnrc.gc.ca>; +Cc: pgsql-admin

On Thu, Feb 23, 2017 at 12:39 PM, ghiureai <isabella.ghiurea@nrc-cnrc.gc.ca>
wrote:

> Hi List,
> we still have 2 hosts  running the old PG 8.3  version, we finally agreed
> to move to PG9.5, please advise what will be  the process for this upgrade
> ? the db size  for upgrade is 500GB(  with 4 table spaces on # volumes)
> ( do I need to move first to PG9.0 and next move up?)
> Isabella
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>


The pg_upgrade option is only available from 8.4 and up, so you're only
simple option is a dump and restore. You could look into other logical
replication tools such as slony, mimeo or bucardo that can replicate
between major versions, but there's quite a bit of setup involved in any of
these solutions. I'd recommend the dump restore for the simplest, most
direct method.

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.

http://www.slony.info/
https://github.com/omniti-labs/mimeo
https://bucardo.org/wiki/Bucardo

Keith

^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: upgrade path from PG 8.3 to PG 9.5
@ 2017-03-21 16:25  Thorsten Schöning <tschoening@am-soft.de>
  parent: Keith <keith@keithf4.com>
  0 siblings, 1 reply; 13+ messages in thread

From: Thorsten Schöning @ 2017-03-21 16:25 UTC (permalink / raw)
  To: pgsql-admin

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.
That way I didn't accidently mix-up installations or use wrong tools
or such.

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

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail: Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow



-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: upgrade path from PG 8.3 to PG 9.5
@ 2017-03-21 16:40  Stephen Frost <sfrost@snowman.net>
  parent: Thorsten Schöning <tschoening@am-soft.de>
  0 siblings, 1 reply; 13+ messages in thread

From: Stephen Frost @ 2017-03-21 16:40 UTC (permalink / raw)
  To: Thorsten Schöning <tschoening@am-soft.de>; +Cc: pgsql-admin

Greetings,

* 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.

> 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

Attachments:

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

^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: upgrade path from PG 8.3 to PG 9.5
@ 2017-03-21 16:47  David G. Johnston <david.g.johnston@gmail.com>
  parent: Stephen Frost <sfrost@snowman.net>
  0 siblings, 2 replies; 13+ messages in thread

From: David G. Johnston @ 2017-03-21 16:47 UTC (permalink / raw)
  To: Stephen Frost <sfrost@snowman.net>; +Cc: Thorsten Schöning <tschoening@am-soft.de>; pgsql-admin

On Tue, Mar 21, 2017 at 9:40 AM, Stephen Frost <sfrost@snowman.net> wrote:

> Greetings,
>
> * 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"​.

​David J.
​

^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: upgrade path from PG 8.3 to PG 9.5
@ 2017-03-21 16:54  Stephen Frost <sfrost@snowman.net>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  1 sibling, 1 reply; 13+ messages in thread

From: Stephen Frost @ 2017-03-21 16:54 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Thorsten Schöning <tschoening@am-soft.de>; pgsql-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

^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: upgrade path from PG 8.3 to PG 9.5
@ 2017-03-21 19:00  Scott Marlowe <scott.marlowe@gmail.com>
  parent: Stephen Frost <sfrost@snowman.net>
  0 siblings, 1 reply; 13+ messages in thread

From: Scott Marlowe @ 2017-03-21 19:00 UTC (permalink / raw)
  To: Stephen Frost <sfrost@snowman.net>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; Thorsten Schöning <tschoening@am-soft.de>; pgsql-admin

On Tue, Mar 21, 2017 at 10:54 AM, Stephen Frost <sfrost@snowman.net> wrote:
> 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.

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.

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

-- 
To understand recursion, one must first understand recursion.


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: upgrade path from PG 8.3 to PG 9.5
@ 2017-03-22 03:12  Tom Lane <tgl@sss.pgh.pa.us>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  1 sibling, 0 replies; 13+ messages in thread

From: Tom Lane @ 2017-03-22 03:12 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Stephen Frost <sfrost@snowman.net>; Thorsten Schöning <tschoening@am-soft.de>; pgsql-admin

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

... which didn't exist before 9.1 ...

			regards, tom lane


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: upgrade path from PG 8.3 to PG 9.5
@ 2017-03-22 07:09  Achilleas Mantzios <achill@matrix.gatewaynet.com>
  parent: Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 1 reply; 13+ messages in thread

From: Achilleas Mantzios @ 2017-03-22 07:09 UTC (permalink / raw)
  To: pgsql-admin

On 21/03/2017 21:00, Scott Marlowe wrote:
> On Tue, Mar 21, 2017 at 10:54 AM, Stephen Frost <sfrost@snowman.net> wrote:
>> 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.
> 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



^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: upgrade path from PG 8.3 to PG 9.5
@ 2017-03-22 14:47  Keith <keith@keithf4.com>
  parent: Achilleas Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 1 reply; 13+ messages in thread

From: Keith @ 2017-03-22 14:47 UTC (permalink / raw)
  To: Achilleas Mantzios <achill@matrix.gatewaynet.com>; +Cc: pgsql-admin

On Wed, Mar 22, 2017 at 3:09 AM, Achilleas Mantzios <
achill@matrix.gatewaynet.com> wrote:

> On 21/03/2017 21:00, Scott Marlowe wrote:
>
>> On Tue, Mar 21, 2017 at 10:54 AM, Stephen Frost <sfrost@snowman.net>
>> wrote:
>>
>>> 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.
>>>
>> 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.
>



I would be curious how that worked since the documentation states the old
version must be at least 8.4.7 for pg_upgrade to work.

https://www.postgresql.org/docs/9.6/static/pgupgrade.html

Just checked this with 8.3.22 and confirmed the binary won't even let you
run it.

$ pg_upgrade -b /opt/pgsql8323/bin -B /opt/pgsql962/bin -c -d
/opt/pgdata/83 -D /opt/pgdata/83upgrade
Performing Consistency Checks
-----------------------------
Checking cluster versions
This utility can only upgrade from PostgreSQL version 8.4 and later.
Failure, exiting

Not trying to be pedantic, but don't want to lead someone down a road that
won't work properly.

Keith


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
>

^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: upgrade path from PG 8.3 to PG 9.5
@ 2017-03-22 15:08  Achilleas Mantzios <achill@matrix.gatewaynet.com>
  parent: Keith <keith@keithf4.com>
  0 siblings, 1 reply; 13+ messages in thread

From: Achilleas Mantzios @ 2017-03-22 15:08 UTC (permalink / raw)
  To: pgsql-admin

On 22/03/2017 16:47, Keith wrote:
>
> 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
>
> I would be curious how that worked since the documentation states the old version must be at least 8.4.7 for pg_upgrade to work.

You missed the 9.4 part : https://www.postgresql.org/docs/9.4/static/pgupgrade.html
"pg_upgrade supports upgrades from 8.3.X and later"

Then they can pg_upgrade from 9.4 -> 9.6 much easier.

>
> https://www.postgresql.org/docs/9.6/static/pgupgrade.html <https://www.postgresql.org/docs/9.6/static/pgupgrade.html;
>
> Just checked this with 8.3.22 and confirmed the binary won't even let you run it.
>
> $ pg_upgrade -b /opt/pgsql8323/bin -B /opt/pgsql962/bin -c -d /opt/pgdata/83 -D /opt/pgdata/83upgrade
> Performing Consistency Checks
> -----------------------------
> Checking cluster versions
> This utility can only upgrade from PostgreSQL version 8.4 and later.
> Failure, exiting
>
> Not trying to be pedantic, but don't want to lead someone down a road that won't work properly.
>
> Keith--
> Achilleas Mantzios
> IT DEV Lead
> IT DEPT
> Dynacom Tankers Mgmt
>
>
>
>
> -- 
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org <mailto:pgsql-admin@postgresql.org>)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin <http://www.postgresql.org/mailpref/pgsql-admin;
>


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

^ permalink  raw  reply  [nested|flat] 13+ messages in thread

* Re: upgrade path from PG 8.3 to PG 9.5
@ 2017-03-22 15:13  Keith <keith@keithf4.com>
  parent: Achilleas Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 0 replies; 13+ messages in thread

From: Keith @ 2017-03-22 15:13 UTC (permalink / raw)
  To: Achilleas Mantzios <achill@matrix.gatewaynet.com>; +Cc: pgsql-admin

On Wed, Mar 22, 2017 at 11:08 AM, Achilleas Mantzios <
achill@matrix.gatewaynet.com> wrote:

> On 22/03/2017 16:47, Keith wrote:
>
>
> 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
>
> I would be curious how that worked since the documentation states the old
> version must be at least 8.4.7 for pg_upgrade to work.
>
>
> You missed the 9.4 part : https://www.postgresql.org/
> docs/9.4/static/pgupgrade.html
> "pg_upgrade supports upgrades from 8.3.X and later"
>
> Then they can pg_upgrade from 9.4 -> 9.6 much easier.
>
>
Ahh I missed that note in the 9.4 docs. Thanks for clarification.


>
> https://www.postgresql.org/docs/9.6/static/pgupgrade.html
>
> Just checked this with 8.3.22 and confirmed the binary won't even let you
> run it.
>
> $ pg_upgrade -b /opt/pgsql8323/bin -B /opt/pgsql962/bin -c -d
> /opt/pgdata/83 -D /opt/pgdata/83upgrade
> Performing Consistency Checks
> -----------------------------
> Checking cluster versions
> This utility can only upgrade from PostgreSQL version 8.4 and later.
> Failure, exiting
>
> Not trying to be pedantic, but don't want to lead someone down a road that
> won't work properly.
>
> Keith--
> Achilleas Mantzios
> IT DEV Lead
> IT DEPT
> Dynacom Tankers Mgmt
>
>
>
>
> --
> Sent via pgsql-admin mailing list ( <pgsql-admin@postgresql.org>
> pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
>
>
> --
> Achilleas Mantzios
> IT DEV Lead
> IT DEPT
> Dynacom Tankers Mgmt
>
>

^ permalink  raw  reply  [nested|flat] 13+ messages in thread


end of thread, other threads:[~2017-03-22 15:13 UTC | newest]

Thread overview: 13+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-02-23 17:39 upgrade path from PG 8.3 to PG 9.5 ghiureai <isabella.ghiurea@nrc-cnrc.gc.ca>
2017-02-23 17:57 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2017-02-23 17:57 ` Keith <keith@keithf4.com>
2017-03-21 16:25   ` Thorsten Schöning <tschoening@am-soft.de>
2017-03-21 16:40     ` Stephen Frost <sfrost@snowman.net>
2017-03-21 16:47       ` David G. Johnston <david.g.johnston@gmail.com>
2017-03-21 16:54         ` Stephen Frost <sfrost@snowman.net>
2017-03-21 19:00           ` Scott Marlowe <scott.marlowe@gmail.com>
2017-03-22 07:09             ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
2017-03-22 14:47               ` Keith <keith@keithf4.com>
2017-03-22 15:08                 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
2017-03-22 15:13                   ` Keith <keith@keithf4.com>
2017-03-22 03:12         ` Tom Lane <tgl@sss.pgh.pa.us>

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