Upgrading from Postgresql 9.1 to 10

Started by Pavan Tejaabout 8 years ago9 messagesgeneral
Jump to latest
#1Pavan Teja
pavan.postgresdba@gmail.com

Hi all,

Is it possible to upgrade an existing postgresql 9.1 production system to
latest Postgres 10.0 version?

The main requirement is to get rid of downtime. Please help me out!

Thanks in Advance.

Regards,
Pavan

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

#2Melvin Davidson
melvin6925@gmail.com
In reply to: Pavan Teja (#1)
Re: Upgrading from Postgresql 9.1 to 10

On Wed, Feb 14, 2018 at 9:42 AM, pavan95 <pavan.postgresdba@gmail.com>
wrote:

Hi all,

Is it possible to upgrade an existing postgresql 9.1 production system to
latest Postgres 10.0 version?

The main requirement is to get rid of downtime. Please help me out!

Thanks in Advance.

Regards,
Pavan

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-
f1843780.html

Is it possible to upgrade an existing postgresql 9.1 production system

to latest Postgres 10.0 version?
This is specifically covered in the documention

8.6. Upgrading a PostgreSQL Cluster

*https://www.postgresql.org/docs/current/static/upgrading.html
<https://www.postgresql.org/docs/current/static/upgrading.html&gt;*--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

#3David G. Johnston
david.g.johnston@gmail.com
In reply to: Pavan Teja (#1)
Re: Upgrading from Postgresql 9.1 to 10

On Wednesday, February 14, 2018, pavan95 <pavan.postgresdba@gmail.com>
wrote:

Hi all,

Is it possible to upgrade an existing postgresql 9.1 production system to
latest Postgres 10.0 version?

The main requirement is to get rid of downtime. Please help me out!

Zero downtime is only possible by standing up a hot-standby then failing
over to it. Same-server upgrade you can do via pg_upgrade but it does
involve downtime. There are lots of material and options online, including
the docs, for setting up hot-standby replication.

David. J.

#4Pavan Teja
pavan.postgresdba@gmail.com
In reply to: Melvin Davidson (#2)
Re: Upgrading from Postgresql 9.1 to 10

Thank you for your timely response 😊

On Feb 14, 2018 8:18 PM, "Melvin Davidson" <melvin6925@gmail.com> wrote:

Show quoted text

On Wed, Feb 14, 2018 at 9:42 AM, pavan95 <pavan.postgresdba@gmail.com>
wrote:

Hi all,

Is it possible to upgrade an existing postgresql 9.1 production system to
latest Postgres 10.0 version?

The main requirement is to get rid of downtime. Please help me out!

Thanks in Advance.

Regards,
Pavan

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f184378
0.html

Is it possible to upgrade an existing postgresql 9.1 production system

to latest Postgres 10.0 version?
This is specifically covered in the documention

8.6. Upgrading a PostgreSQL Cluster

*https://www.postgresql.org/docs/current/static/upgrading.html
<https://www.postgresql.org/docs/current/static/upgrading.html&gt;*--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

#5David G. Johnston
david.g.johnston@gmail.com
In reply to: David G. Johnston (#3)
Re: Upgrading from Postgresql 9.1 to 10

On Wednesday, February 14, 2018, David G. Johnston <
david.g.johnston@gmail.com> wrote:

On Wednesday, February 14, 2018, pavan95 <pavan.postgresdba@gmail.com>
wrote:

Hi all,

Is it possible to upgrade an existing postgresql 9.1 production system to
latest Postgres 10.0 version?

The main requirement is to get rid of downtime. Please help me out!

Zero downtime is only possible by standing up a hot-standby then failing
over to it. Same-server upgrade you can do via pg_upgrade but it does
involve downtime. There are lots of material and options online, including
the docs, for setting up hot-standby replication.

To clarify, you need to use logical replication here since the WAL format
is not usable across versions.

pg_upgrade is your simplest option if you can handle its downtime.

David J.

#6Pavan Teja
pavan.postgresdba@gmail.com
In reply to: David G. Johnston (#5)
Re: Upgrading from Postgresql 9.1 to 10

Yeah David,

Even I'm thinking the same

Regards,
Pavan

On Feb 14, 2018 8:34 PM, "David G. Johnston" <david.g.johnston@gmail.com>
wrote:

Show quoted text

On Wednesday, February 14, 2018, David G. Johnston <
david.g.johnston@gmail.com> wrote:

On Wednesday, February 14, 2018, pavan95 <pavan.postgresdba@gmail.com>
wrote:

Hi all,

Is it possible to upgrade an existing postgresql 9.1 production system to
latest Postgres 10.0 version?

The main requirement is to get rid of downtime. Please help me out!

Zero downtime is only possible by standing up a hot-standby then failing
over to it. Same-server upgrade you can do via pg_upgrade but it does
involve downtime. There are lots of material and options online, including
the docs, for setting up hot-standby replication.

To clarify, you need to use logical replication here since the WAL format
is not usable across versions.

pg_upgrade is your simplest option if you can handle its downtime.

David J.

#7Melvin Davidson
melvin6925@gmail.com
In reply to: David G. Johnston (#5)
Re: Upgrading from Postgresql 9.1 to 10

On Wed, Feb 14, 2018 at 10:04 AM, David G. Johnston <
david.g.johnston@gmail.com> wrote:

On Wednesday, February 14, 2018, David G. Johnston <
david.g.johnston@gmail.com> wrote:

On Wednesday, February 14, 2018, pavan95 <pavan.postgresdba@gmail.com>
wrote:

Hi all,

Is it possible to upgrade an existing postgresql 9.1 production system to
latest Postgres 10.0 version?

The main requirement is to get rid of downtime. Please help me out!

Zero downtime is only possible by standing up a hot-standby then failing
over to it. Same-server upgrade you can do via pg_upgrade but it does
involve downtime. There are lots of material and options online, including
the docs, for setting up hot-standby replication.

To clarify, you need to use logical replication here since the WAL format
is not usable across versions.

pg_upgrade is your simplest option if you can handle its downtime.

David J.

To clarify, you need to use logical replication here since the WAL format

is not usable across versions.
Slony replication also allows upgrading between versions without downtime.

http://www.slony.info/
--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

#8Michael Paquier
michael@paquier.xyz
In reply to: David G. Johnston (#3)
Re: Upgrading from Postgresql 9.1 to 10

On Wed, Feb 14, 2018 at 07:47:55AM -0700, David G. Johnston wrote:

Zero downtime is only possible by standing up a hot-standby then failing
over to it. Same-server upgrade you can do via pg_upgrade but it does
involve downtime. There are lots of material and options online, including
the docs, for setting up hot-standby replication.

PostgreSQL 10 adds logical replication which is able to handle this
scenario with close to zero downtime if you use it with synchronous
replication. So with 9.1 as origin server you cannot use that. Logical
decoding facilities being added in 9.4, it could be possible to upgrade
at least from this version using 2nd Quadrant's pglogical (correct me
others here if I am incorrect!).

Now, for older versions, the usual way to do things is by using Slony
which does trigger-based replication. This can help you reach close to
no downtime, way lower than pg_upgrade for example even if you use its
--link mode. pg_upgrade --link can work very quickly as well, so if you
care about being close to zero you may want to consider it.
--
Michael

#9Pavan Teja
pavan.postgresdba@gmail.com
In reply to: Michael Paquier (#8)
Re: Upgrading from Postgresql 9.1 to 10