pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
upgrade and migrate
13+ messages / 10 participants
[nested] [flat]

* upgrade and migrate
@ 2019-12-03 22:32 Julie Nishimura <juliezain@hotmail.com>
  2019-12-04 04:48 ` Re: upgrade and migrate Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 13+ messages in thread

From: Julie Nishimura @ 2019-12-03 22:32 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general

Hello, what is the best way to migrate from PostgreSQL 8.3.11 on x86_64-redhat-linux-gnu to PostgreSQL 9.6.16 on x86_64-pc-linux-gnu server, with minimal downtime?
The caveat is the source has about 80 databases overall almost 30 TB. I could migrate the smallest ones (up to 1 tb) using pg_dump and pg_restore, but the largest hot database is almost 17 tb, and I am not sure how to approach this effort in a better and efficient way?

Thank you!
-Julie N

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

* Re: upgrade and migrate
  2019-12-03 22:32 upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
@ 2019-12-04 04:48 ` Michael Paquier <michael@paquier.xyz>
  2019-12-04 07:13   ` Re: upgrade and migrate Ron <ronljohnsonjr@gmail.com>
  2019-12-04 07:38   ` Re: upgrade and migrate Thomas Kellerer <spam_eater@gmx.net>
  2019-12-04 07:56   ` Re: upgrade and migrate Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 3 replies; 13+ messages in thread

From: Michael Paquier @ 2019-12-04 04:48 UTC (permalink / raw)
  To: Julie Nishimura <juliezain@hotmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general

On Tue, Dec 03, 2019 at 10:32:22PM +0000, Julie Nishimura wrote:
> Hello, what is the best way to migrate from PostgreSQL 8.3.11 on
> x86_64-redhat-linux-gnu to PostgreSQL 9.6.16 on x86_64-pc-linux-gnu
> server, with minimal downtime?
> The caveat is the source has about 80 databases overall almost 30
> TB. I could migrate the smallest ones (up to 1 tb) using pg_dump and
> pg_restore, but the largest hot database is almost 17 tb, and I am
> not sure how to approach this effort in a better and efficient way?

pg_upgrade could be one way to go here.  That's not the scale pg_dump
would be very good at.  I would have personally avoided using pg_dump
above 10~20GB.  Depending on the downtime you are ready to accept,
a migration based on Slony could be something to investigate.
--
Michael

Attachments:

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

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

* Re: upgrade and migrate
  2019-12-03 22:32 upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
  2019-12-04 04:48 ` Re: upgrade and migrate Michael Paquier <michael@paquier.xyz>
@ 2019-12-04 07:13   ` Ron <ronljohnsonjr@gmail.com>
  2 siblings, 0 replies; 13+ messages in thread

From: Ron @ 2019-12-04 07:13 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 12/3/19 10:48 PM, Michael Paquier wrote:
> On Tue, Dec 03, 2019 at 10:32:22PM +0000, Julie Nishimura wrote:
>> Hello, what is the best way to migrate from PostgreSQL 8.3.11 on
>> x86_64-redhat-linux-gnu to PostgreSQL 9.6.16 on x86_64-pc-linux-gnu
>> server, with minimal downtime?
>> The caveat is the source has about 80 databases overall almost 30
>> TB. I could migrate the smallest ones (up to 1 tb) using pg_dump and
>> pg_restore, but the largest hot database is almost 17 tb, and I am
>> not sure how to approach this effort in a better and efficient way?
> pg_upgrade could be one way to go here.  That's not the scale pg_dump
> would be very good at.  I would have personally avoided using pg_dump
> above 10~20GB.

I've successfully migrated three 1-2 TB databases across data centers in 
about 12 hours each, from 8.4 to 9.6.  Used eight threads, and the 9.6 
pg_dump against the 8.4 database.  17TB is a "bridge too far", though...

> Depending on the downtime you are ready to accept,
> a migration based on Slony could be something to investigate.
> --
> Michael

-- 
Angular momentum makes the world go 'round.





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

* Re: upgrade and migrate
  2019-12-03 22:32 upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
  2019-12-04 04:48 ` Re: upgrade and migrate Michael Paquier <michael@paquier.xyz>
@ 2019-12-04 07:38   ` Thomas Kellerer <spam_eater@gmx.net>
  2019-12-04 08:08     ` Re: upgrade and migrate Michael Paquier <michael@paquier.xyz>
  2 siblings, 1 reply; 13+ messages in thread

From: Thomas Kellerer @ 2019-12-04 07:38 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Michael Paquier schrieb am 04.12.2019 um 05:48:
> On Tue, Dec 03, 2019 at 10:32:22PM +0000, Julie Nishimura wrote:
>> Hello, what is the best way to migrate from PostgreSQL 8.3.11 on
>> x86_64-redhat-linux-gnu to PostgreSQL 9.6.16 on x86_64-pc-linux-gnu
>> server, with minimal downtime?
>> The caveat is the source has about 80 databases overall almost 30
>> TB. I could migrate the smallest ones (up to 1 tb) using pg_dump and
>> pg_restore, but the largest hot database is almost 17 tb, and I am
>> not sure how to approach this effort in a better and efficient way?
> 
> pg_upgrade could be one way to go here.  That's not the scale pg_dump
> would be very good at.  

But pg_upgrade only supports 8.4+ 

At least according to the manual.






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

* Re: upgrade and migrate
  2019-12-03 22:32 upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
  2019-12-04 04:48 ` Re: upgrade and migrate Michael Paquier <michael@paquier.xyz>
  2019-12-04 07:38   ` Re: upgrade and migrate Thomas Kellerer <spam_eater@gmx.net>
@ 2019-12-04 08:08     ` Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 13+ messages in thread

From: Michael Paquier @ 2019-12-04 08:08 UTC (permalink / raw)
  To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-general@lists.postgresql.org

On Wed, Dec 04, 2019 at 08:38:01AM +0100, Thomas Kellerer wrote:
> But pg_upgrade only supports 8.4+

Ditto.  You're right here.
--
Michael

Attachments:

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

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

* Re: upgrade and migrate
  2019-12-03 22:32 upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
  2019-12-04 04:48 ` Re: upgrade and migrate Michael Paquier <michael@paquier.xyz>
@ 2019-12-04 07:56   ` Laurenz Albe <laurenz.albe@cybertec.at>
  2019-12-04 13:08     ` Re: upgrade and migrate Stephen Frost <sfrost@snowman.net>
  2019-12-04 15:26     ` Re: upgrade and migrate Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  2 siblings, 2 replies; 13+ messages in thread

From: Laurenz Albe @ 2019-12-04 07:56 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; Julie Nishimura <juliezain@hotmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general

On Wed, 2019-12-04 at 13:48 +0900, Michael Paquier wrote:
> On Tue, Dec 03, 2019 at 10:32:22PM +0000, Julie Nishimura wrote:
> > Hello, what is the best way to migrate from PostgreSQL 8.3.11 on
> > x86_64-redhat-linux-gnu to PostgreSQL 9.6.16 on x86_64-pc-linux-gnu
> > server, with minimal downtime?
> > The caveat is the source has about 80 databases overall almost 30
> > TB. I could migrate the smallest ones (up to 1 tb) using pg_dump and
> > pg_restore, but the largest hot database is almost 17 tb, and I am
> > not sure how to approach this effort in a better and efficient way?
> 
> pg_upgrade could be one way to go here.  That's not the scale pg_dump
> would be very good at.  I would have personally avoided using pg_dump
> above 10~20GB.  Depending on the downtime you are ready to accept,
> a migration based on Slony could be something to investigate.

Right, Slony is the way to go, since pg_upgrade doesn't support 8.3.

I would upgrade to a version more recent than 9.6.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






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

* Re: upgrade and migrate
  2019-12-03 22:32 upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
  2019-12-04 04:48 ` Re: upgrade and migrate Michael Paquier <michael@paquier.xyz>
  2019-12-04 07:56   ` Re: upgrade and migrate Laurenz Albe <laurenz.albe@cybertec.at>
@ 2019-12-04 13:08     ` Stephen Frost <sfrost@snowman.net>
  2019-12-04 13:28       ` Re: upgrade and migrate Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 13+ messages in thread

From: Stephen Frost @ 2019-12-04 13:08 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: Michael Paquier <michael@paquier.xyz>; Julie Nishimura <juliezain@hotmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general

Greetings,

* Laurenz Albe (laurenz.albe@cybertec.at) wrote:
> On Wed, 2019-12-04 at 13:48 +0900, Michael Paquier wrote:
> > On Tue, Dec 03, 2019 at 10:32:22PM +0000, Julie Nishimura wrote:
> > > Hello, what is the best way to migrate from PostgreSQL 8.3.11 on
> > > x86_64-redhat-linux-gnu to PostgreSQL 9.6.16 on x86_64-pc-linux-gnu
> > > server, with minimal downtime?
> > > The caveat is the source has about 80 databases overall almost 30
> > > TB. I could migrate the smallest ones (up to 1 tb) using pg_dump and
> > > pg_restore, but the largest hot database is almost 17 tb, and I am
> > > not sure how to approach this effort in a better and efficient way?
> > 
> > pg_upgrade could be one way to go here.  That's not the scale pg_dump
> > would be very good at.  I would have personally avoided using pg_dump
> > above 10~20GB.  Depending on the downtime you are ready to accept,
> > a migration based on Slony could be something to investigate.
> 
> Right, Slony is the way to go, since pg_upgrade doesn't support 8.3.
> 
> I would upgrade to a version more recent than 9.6.

So...  there's a bit of history here.  pg_upgrade in 9.4 actually does
support upgrading from 8.3.X.  Support for upgrading from 8.3 was
removed in 2209b3923a7afe0b6033ecfea972219df252ca8e.

Thanks,

Stephen

Attachments:

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

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

* Re: upgrade and migrate
  2019-12-03 22:32 upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
  2019-12-04 04:48 ` Re: upgrade and migrate Michael Paquier <michael@paquier.xyz>
  2019-12-04 07:56   ` Re: upgrade and migrate Laurenz Albe <laurenz.albe@cybertec.at>
  2019-12-04 13:08     ` Re: upgrade and migrate Stephen Frost <sfrost@snowman.net>
@ 2019-12-04 13:28       ` Tom Lane <tgl@sss.pgh.pa.us>
  2019-12-06 16:14         ` Re: upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
  0 siblings, 1 reply; 13+ messages in thread

From: Tom Lane @ 2019-12-04 13:28 UTC (permalink / raw)
  To: Stephen Frost <sfrost@snowman.net>; +Cc: Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier <michael@paquier.xyz>; Julie Nishimura <juliezain@hotmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general

Stephen Frost <sfrost@snowman.net> writes:
> * Laurenz Albe (laurenz.albe@cybertec.at) wrote:
>> Right, Slony is the way to go, since pg_upgrade doesn't support 8.3.
>> I would upgrade to a version more recent than 9.6.

> So...  there's a bit of history here.  pg_upgrade in 9.4 actually does
> support upgrading from 8.3.X.  Support for upgrading from 8.3 was
> removed in 2209b3923a7afe0b6033ecfea972219df252ca8e.

Yeah.  Also note that 8.3 to 9.6-or-newer is going to be a pretty
huge jump in terms of minor compatibility issues (have you read
all the relevant release notes?).  So there's something to be said
for breaking this down into two steps: update to 9.4, test/fix
your applications against that, then make a second jump to something
current.  Each of those jumps could be handled by the respective
version of pg_upgrade.  I concur with Laurenz's advice that stopping
at 9.6 is probably not your best choice for a migration today.

			regards, tom lane





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

* Re: upgrade and migrate
  2019-12-03 22:32 upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
  2019-12-04 04:48 ` Re: upgrade and migrate Michael Paquier <michael@paquier.xyz>
  2019-12-04 07:56   ` Re: upgrade and migrate Laurenz Albe <laurenz.albe@cybertec.at>
  2019-12-04 13:08     ` Re: upgrade and migrate Stephen Frost <sfrost@snowman.net>
  2019-12-04 13:28       ` Re: upgrade and migrate Tom Lane <tgl@sss.pgh.pa.us>
@ 2019-12-06 16:14         ` Julie Nishimura <juliezain@hotmail.com>
  2019-12-06 17:02           ` Re: upgrade and migrate Adrian Klaver <adrian.klaver@aklaver.com>
  2019-12-06 18:06           ` Re: upgrade and migrate Justin <zzzzz.graf@gmail.com>
  0 siblings, 2 replies; 13+ messages in thread

From: Julie Nishimura @ 2019-12-06 16:14 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; Stephen Frost <sfrost@snowman.net>; +Cc: Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier <michael@paquier.xyz>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general

Thank you everybody for your suggestions.
So, to summarize - we can run pg_upgrade from 8.3 to 9.4 (in place), fix app related issues (if any), then migrate to a version more recent than 9.6, either through pg_basebackup or through logical replication (if we would upgrade to version 10).

First step requires downtime. Second does not. Correct?

-Julie

________________________________
From: Tom Lane <tgl@sss.pgh.pa.us>
Sent: Wednesday, December 4, 2019 5:28 AM
To: Stephen Frost <sfrost@snowman.net>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier <michael@paquier.xyz>; Julie Nishimura <juliezain@hotmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general <pgsql-general@postgresql.org>
Subject: Re: upgrade and migrate

Stephen Frost <sfrost@snowman.net> writes:
> * Laurenz Albe (laurenz.albe@cybertec.at) wrote:
>> Right, Slony is the way to go, since pg_upgrade doesn't support 8.3.
>> I would upgrade to a version more recent than 9.6.

> So...  there's a bit of history here.  pg_upgrade in 9.4 actually does
> support upgrading from 8.3.X.  Support for upgrading from 8.3 was
> removed in 2209b3923a7afe0b6033ecfea972219df252ca8e.

Yeah.  Also note that 8.3 to 9.6-or-newer is going to be a pretty
huge jump in terms of minor compatibility issues (have you read
all the relevant release notes?).  So there's something to be said
for breaking this down into two steps: update to 9.4, test/fix
your applications against that, then make a second jump to something
current.  Each of those jumps could be handled by the respective
version of pg_upgrade.  I concur with Laurenz's advice that stopping
at 9.6 is probably not your best choice for a migration today.

                        regards, tom lane

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

* Re: upgrade and migrate
  2019-12-03 22:32 upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
  2019-12-04 04:48 ` Re: upgrade and migrate Michael Paquier <michael@paquier.xyz>
  2019-12-04 07:56   ` Re: upgrade and migrate Laurenz Albe <laurenz.albe@cybertec.at>
  2019-12-04 13:08     ` Re: upgrade and migrate Stephen Frost <sfrost@snowman.net>
  2019-12-04 13:28       ` Re: upgrade and migrate Tom Lane <tgl@sss.pgh.pa.us>
  2019-12-06 16:14         ` Re: upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
@ 2019-12-06 17:02           ` Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 0 replies; 13+ messages in thread

From: Adrian Klaver @ 2019-12-06 17:02 UTC (permalink / raw)
  To: Julie Nishimura <juliezain@hotmail.com>; Tom Lane <tgl@sss.pgh.pa.us>; Stephen Frost <sfrost@snowman.net>; +Cc: Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier <michael@paquier.xyz>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general

On 12/6/19 8:14 AM, Julie Nishimura wrote:
> Thank you everybody for your suggestions.
> So, to summarize - we can run pg_upgrade from 8.3 to 9.4 (in place), fix 
> app related issues (if any), then migrate to a version more recent than 
> 9.6, either through pg_basebackup or through logical replication (if we 
> would upgrade to version 10).
> 
> First step requires downtime. Second does not. Correct?

Well pg_basebackup is a binary copy so I am pretty sure you cannot use 
the copy from an old Postgres version with a new Postgres major version. 
I am also pretty sure whatever you do there is going to be some 
downtime. Left unsaid to date and relevant to downtime:

1) Space/machines available to juggle multiple Postgres instances?

2) Network proximity of above.

3) Whether it is essential all the databases remain in a single cluster?

> 
> -Julie
> 
> ------------------------------------------------------------------------
> *From:* Tom Lane <tgl@sss.pgh.pa.us>
> *Sent:* Wednesday, December 4, 2019 5:28 AM
> *To:* Stephen Frost <sfrost@snowman.net>
> *Cc:* Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier 
> <michael@paquier.xyz>; Julie Nishimura <juliezain@hotmail.com>; 
> pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; 
> pgsql-general <pgsql-general@postgresql.org>
> *Subject:* Re: upgrade and migrate
> Stephen Frost <sfrost@snowman.net> writes:
>> * Laurenz Albe (laurenz.albe@cybertec.at) wrote:
>>> Right, Slony is the way to go, since pg_upgrade doesn't support 8.3.
>>> I would upgrade to a version more recent than 9.6.
> 
>> So...  there's a bit of history here.  pg_upgrade in 9.4 actually does
>> support upgrading from 8.3.X.  Support for upgrading from 8.3 was
>> removed in 2209b3923a7afe0b6033ecfea972219df252ca8e.
> 
> Yeah.  Also note that 8.3 to 9.6-or-newer is going to be a pretty
> huge jump in terms of minor compatibility issues (have you read
> all the relevant release notes?).  So there's something to be said
> for breaking this down into two steps: update to 9.4, test/fix
> your applications against that, then make a second jump to something
> current.  Each of those jumps could be handled by the respective
> version of pg_upgrade.  I concur with Laurenz's advice that stopping
> at 9.6 is probably not your best choice for a migration today.
> 
>                          regards, tom lane


-- 
Adrian Klaver
adrian.klaver@aklaver.com





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

* Re: upgrade and migrate
  2019-12-03 22:32 upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
  2019-12-04 04:48 ` Re: upgrade and migrate Michael Paquier <michael@paquier.xyz>
  2019-12-04 07:56   ` Re: upgrade and migrate Laurenz Albe <laurenz.albe@cybertec.at>
  2019-12-04 13:08     ` Re: upgrade and migrate Stephen Frost <sfrost@snowman.net>
  2019-12-04 13:28       ` Re: upgrade and migrate Tom Lane <tgl@sss.pgh.pa.us>
  2019-12-06 16:14         ` Re: upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
@ 2019-12-06 18:06           ` Justin <zzzzz.graf@gmail.com>
  2019-12-06 19:36             ` Re: upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
  1 sibling, 1 reply; 13+ messages in thread

From: Justin @ 2019-12-06 18:06 UTC (permalink / raw)
  To: Julie Nishimura <juliezain@hotmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Stephen Frost <sfrost@snowman.net>; Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier <michael@paquier.xyz>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general

Off topic but food for thought given the jump in versions 8.3 to (9.6 or
greater.)

List of major changes i can think of to watch out for that can bite without
warning..

SQL operators~=~   for Like were drop in 8.4 => for hstore was drop in 9.0
in 9.1 standard_conforming_string is  ON by default   previous the default
was Off..
9.4 affected  arrays.
9.5 operator precedence was changed  this affects output and near
impossible to find all the code it can affect..
10 removed contrib/tsearch2 (added to the core in 8.3)

There are allot more minor changes that can bit....

Has a test machine been setup and run yet??  just dumping the schema and
restore to later version will point out several issues with custom
data-types,  plpgsql, other PL languages and any missing extensions...








On Fri, Dec 6, 2019 at 11:16 AM Julie Nishimura <juliezain@hotmail.com>
wrote:

> Thank you everybody for your suggestions.
> So, to summarize - we can run pg_upgrade from 8.3 to 9.4 (in place), fix
> app related issues (if any), then migrate to a version more recent than
> 9.6, either through pg_basebackup or through logical replication (if we
> would upgrade to version 10).
>
> First step requires downtime. Second does not. Correct?
>
> -Julie
>
> ------------------------------
> *From:* Tom Lane <tgl@sss.pgh.pa.us>
> *Sent:* Wednesday, December 4, 2019 5:28 AM
> *To:* Stephen Frost <sfrost@snowman.net>
> *Cc:* Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier <
> michael@paquier.xyz>; Julie Nishimura <juliezain@hotmail.com>;
> pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>;
> pgsql-general <pgsql-general@postgresql.org>
> *Subject:* Re: upgrade and migrate
>
> Stephen Frost <sfrost@snowman.net> writes:
> > * Laurenz Albe (laurenz.albe@cybertec.at) wrote:
> >> Right, Slony is the way to go, since pg_upgrade doesn't support 8.3.
> >> I would upgrade to a version more recent than 9.6.
>
> > So...  there's a bit of history here.  pg_upgrade in 9.4 actually does
> > support upgrading from 8.3.X.  Support for upgrading from 8.3 was
> > removed in 2209b3923a7afe0b6033ecfea972219df252ca8e.
>
> Yeah.  Also note that 8.3 to 9.6-or-newer is going to be a pretty
> huge jump in terms of minor compatibility issues (have you read
> all the relevant release notes?).  So there's something to be said
> for breaking this down into two steps: update to 9.4, test/fix
> your applications against that, then make a second jump to something
> current.  Each of those jumps could be handled by the respective
> version of pg_upgrade.  I concur with Laurenz's advice that stopping
> at 9.6 is probably not your best choice for a migration today.
>
>                         regards, tom lane
>

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

* Re: upgrade and migrate
  2019-12-03 22:32 upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
  2019-12-04 04:48 ` Re: upgrade and migrate Michael Paquier <michael@paquier.xyz>
  2019-12-04 07:56   ` Re: upgrade and migrate Laurenz Albe <laurenz.albe@cybertec.at>
  2019-12-04 13:08     ` Re: upgrade and migrate Stephen Frost <sfrost@snowman.net>
  2019-12-04 13:28       ` Re: upgrade and migrate Tom Lane <tgl@sss.pgh.pa.us>
  2019-12-06 16:14         ` Re: upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
  2019-12-06 18:06           ` Re: upgrade and migrate Justin <zzzzz.graf@gmail.com>
@ 2019-12-06 19:36             ` Julie Nishimura <juliezain@hotmail.com>
  0 siblings, 0 replies; 13+ messages in thread

From: Julie Nishimura @ 2019-12-06 19:36 UTC (permalink / raw)
  To: Justin <zzzzz.graf@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Stephen Frost <sfrost@snowman.net>; Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier <michael@paquier.xyz>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general

These are great points. Thanks! I will push for some testing environment

________________________________
From: Justin <zzzzz.graf@gmail.com>
Sent: Friday, December 6, 2019 10:06 AM
To: Julie Nishimura <juliezain@hotmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>; Stephen Frost <sfrost@snowman.net>; Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier <michael@paquier.xyz>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general <pgsql-general@postgresql.org>
Subject: Re: upgrade and migrate

Off topic but food for thought given the jump in versions 8.3 to (9.6 or greater.)

List of major changes i can think of to watch out for that can bite without warning..

SQL operators~=~   for Like were drop in 8.4 => for hstore was drop in 9.0
in 9.1 standard_conforming_string is  ON by default   previous the default was Off..
9.4 affected  arrays.
9.5 operator precedence was changed  this affects output and near impossible to find all the code it can affect..
10 removed contrib/tsearch2 (added to the core in 8.3)

There are allot more minor changes that can bit....

Has a test machine been setup and run yet??  just dumping the schema and restore to later version will point out several issues with custom data-types,  plpgsql, other PL languages and any missing extensions...








On Fri, Dec 6, 2019 at 11:16 AM Julie Nishimura <juliezain@hotmail.com<mailto:juliezain@hotmail.com>> wrote:
Thank you everybody for your suggestions.
So, to summarize - we can run pg_upgrade from 8.3 to 9.4 (in place), fix app related issues (if any), then migrate to a version more recent than 9.6, either through pg_basebackup or through logical replication (if we would upgrade to version 10).

First step requires downtime. Second does not. Correct?

-Julie

________________________________
From: Tom Lane <tgl@sss.pgh.pa.us<mailto:tgl@sss.pgh.pa.us>>
Sent: Wednesday, December 4, 2019 5:28 AM
To: Stephen Frost <sfrost@snowman.net<mailto:sfrost@snowman.net>>
Cc: Laurenz Albe <laurenz.albe@cybertec.at<mailto:laurenz.albe@cybertec.at>>; Michael Paquier <michael@paquier.xyz<mailto:michael@paquier.xyz>>; Julie Nishimura <juliezain@hotmail.com<mailto:juliezain@hotmail.com>>; pgsql-general@lists.postgresql.org<mailto:pgsql-general@lists.postgresql.org> <pgsql-general@lists.postgresql.org<mailto:pgsql-general@lists.postgresql.org>>; pgsql-general <pgsql-general@postgresql.org<mailto:pgsql-general@postgresql.org>>
Subject: Re: upgrade and migrate

Stephen Frost <sfrost@snowman.net<mailto:sfrost@snowman.net>> writes:
> * Laurenz Albe (laurenz.albe@cybertec.at<mailto:laurenz.albe@cybertec.at>) wrote:
>> Right, Slony is the way to go, since pg_upgrade doesn't support 8.3.
>> I would upgrade to a version more recent than 9.6.

> So...  there's a bit of history here.  pg_upgrade in 9.4 actually does
> support upgrading from 8.3.X.  Support for upgrading from 8.3 was
> removed in 2209b3923a7afe0b6033ecfea972219df252ca8e.

Yeah.  Also note that 8.3 to 9.6-or-newer is going to be a pretty
huge jump in terms of minor compatibility issues (have you read
all the relevant release notes?).  So there's something to be said
for breaking this down into two steps: update to 9.4, test/fix
your applications against that, then make a second jump to something
current.  Each of those jumps could be handled by the respective
version of pg_upgrade.  I concur with Laurenz's advice that stopping
at 9.6 is probably not your best choice for a migration today.

                        regards, tom lane

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

* Re: upgrade and migrate
  2019-12-03 22:32 upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
  2019-12-04 04:48 ` Re: upgrade and migrate Michael Paquier <michael@paquier.xyz>
  2019-12-04 07:56   ` Re: upgrade and migrate Laurenz Albe <laurenz.albe@cybertec.at>
@ 2019-12-04 15:26     ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  1 sibling, 0 replies; 13+ messages in thread

From: Peter Eisentraut @ 2019-12-04 15:26 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier <michael@paquier.xyz>; Julie Nishimura <juliezain@hotmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general

On 2019-12-04 08:56, Laurenz Albe wrote:
> On Wed, 2019-12-04 at 13:48 +0900, Michael Paquier wrote:
>> On Tue, Dec 03, 2019 at 10:32:22PM +0000, Julie Nishimura wrote:
>>> Hello, what is the best way to migrate from PostgreSQL 8.3.11 on
>>> x86_64-redhat-linux-gnu to PostgreSQL 9.6.16 on x86_64-pc-linux-gnu
>>> server, with minimal downtime?
>>> The caveat is the source has about 80 databases overall almost 30
>>> TB. I could migrate the smallest ones (up to 1 tb) using pg_dump and
>>> pg_restore, but the largest hot database is almost 17 tb, and I am
>>> not sure how to approach this effort in a better and efficient way?
>>
>> pg_upgrade could be one way to go here.  That's not the scale pg_dump
>> would be very good at.  I would have personally avoided using pg_dump
>> above 10~20GB.  Depending on the downtime you are ready to accept,
>> a migration based on Slony could be something to investigate.
> 
> Right, Slony is the way to go, since pg_upgrade doesn't support 8.3.

Also consider Londiste.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





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


end of thread, other threads:[~2019-12-06 19:36 UTC | newest]

Thread overview: 13+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03 22:32 upgrade and migrate Julie Nishimura <juliezain@hotmail.com>
2019-12-04 04:48 ` Michael Paquier <michael@paquier.xyz>
2019-12-04 07:13   ` Ron <ronljohnsonjr@gmail.com>
2019-12-04 07:38   ` Thomas Kellerer <spam_eater@gmx.net>
2019-12-04 08:08     ` Michael Paquier <michael@paquier.xyz>
2019-12-04 07:56   ` Laurenz Albe <laurenz.albe@cybertec.at>
2019-12-04 13:08     ` Stephen Frost <sfrost@snowman.net>
2019-12-04 13:28       ` Tom Lane <tgl@sss.pgh.pa.us>
2019-12-06 16:14         ` Julie Nishimura <juliezain@hotmail.com>
2019-12-06 17:02           ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-12-06 18:06           ` Justin <zzzzz.graf@gmail.com>
2019-12-06 19:36             ` Julie Nishimura <juliezain@hotmail.com>
2019-12-04 15:26     ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

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