migration from 9.4 to 9.6

Started by Julie Nishimuraover 6 years ago6 messagesgeneral
Jump to latest
#1Julie Nishimura
juliezain@hotmail.com

Hello there, what would be my best way to migrate 2 tb single database from cluster 9.4 to another machine on 9.6?

Thank you!

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Julie Nishimura (#1)
Re: migration from 9.4 to 9.6

On 12/6/19 1:19 PM, Julie Nishimura wrote:

Hello there, what would be my best way to migrate 2 tb single database
from cluster 9.4 to another machine on 9.6?

Not clear if you want to add database to an existing 9.6 cluster or
create a new 9.6 cluster containing the 9.4 database?

Thank you!

--
Adrian Klaver
adrian.klaver@aklaver.com

#3Julie Nishimura
juliezain@hotmail.com
In reply to: Adrian Klaver (#2)
Re: migration from 9.4 to 9.6

I'd like to copy one single database from 9.4 cluster to a new 9.6 cluster (migration with the upgrade), to the different host

________________________________
From: Adrian Klaver <adrian.klaver@aklaver.com>
Sent: Friday, December 6, 2019 1:32 PM
To: Julie Nishimura <juliezain@hotmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general <pgsql-general@postgresql.org>
Subject: Re: migration from 9.4 to 9.6

On 12/6/19 1:19 PM, Julie Nishimura wrote:

Hello there, what would be my best way to migrate 2 tb single database
from cluster 9.4 to another machine on 9.6?

Not clear if you want to add database to an existing 9.6 cluster or
create a new 9.6 cluster containing the 9.4 database?

Thank you!

--
Adrian Klaver
adrian.klaver@aklaver.com

#4Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Julie Nishimura (#3)
Re: migration from 9.4 to 9.6

On 12/6/19 1:38 PM, Julie Nishimura wrote:

I'd like to copy one single database from 9.4 cluster to a new 9.6
cluster (migration with the upgrade), to the different host

Choices:

1) Dump/restore.

2) Afore mentioned Slony.

3) The pglogical
extension(https://www.2ndquadrant.com/en/resources/pglogical/pglogical-docs/).
The forerunner to the built in logical replication in 10+.

------------------------------------------------------------------------
*From:* Adrian Klaver <adrian.klaver@aklaver.com>
*Sent:* Friday, December 6, 2019 1:32 PM
*To:* Julie Nishimura <juliezain@hotmail.com>;
pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>;
pgsql-general <pgsql-general@postgresql.org>
*Subject:* Re: migration from 9.4 to 9.6
On 12/6/19 1:19 PM, Julie Nishimura wrote:

Hello there, what would be my best way to migrate 2 tb single database
from cluster 9.4 to another machine on 9.6?

Not clear if you want to add database to an existing 9.6 cluster or
create a new 9.6 cluster containing the 9.4 database?

Thank you!

--
Adrian Klaver
adrian.klaver@aklaver.com

--
Adrian Klaver
adrian.klaver@aklaver.com

#5Alan Hodgson
ahodgson@lists.simkin.ca
In reply to: Julie Nishimura (#3)
Re: migration from 9.4 to 9.6

On Fri, 2019-12-06 at 21:38 +0000, Julie Nishimura wrote:

I'd like to copy one single database from 9.4 cluster to a new 9.6
cluster (migration with the upgrade), to the different host

Put 9.4 on the new server. Replicate the db to it. When you're ready to
switch, shut down the master, promote the new db, and then shut it down
and pg_upgrade -k it to 9.6.

That does require the binaries from both versions to be on the new
server for a while, but it'll give you the least downtime and it's a
very simple replication setup.

#6Ekaterina Amez
ekaterina.amez@zunibal.com
In reply to: Alan Hodgson (#5)
Re: migration from 9.4 to 9.6

El 6/12/19 a las 23:07, Alan Hodgson escribió:

On Fri, 2019-12-06 at 21:38 +0000, Julie Nishimura wrote:

I'd like to copy one single database from 9.4 cluster to a new 9.6
cluster (migration with the upgrade), to the different host

Put 9.4 on the new server. Replicate the db to it. When you're ready
to switch, shut down the master, promote the new db, and then shut it
down and pg_upgrade -k it to 9.6.

That does require the binaries from both versions to be on the new
server for a while, but it'll give you the least downtime and it's a
very simple replication setup.

This is the plan we're going to follow to migrate from 9.2 to 9.6, as
this is the only way to achieve almost zero downtime. The cons are,
despite what Alan has mentioned, that you need double space because you
have to create a slave replica.