Re: Upgrading from Postgresql 9.1 to 10

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pavan95 <pavan(dot)postgresdba(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Upgrading from Postgresql 9.1 to 10
Date: 2018-02-15 07:58:46
Message-ID: 20180215075846.GB25356@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message pavan95 2018-02-15 11:09:50 Re: Upgrading from Postgresql 9.1 to 10
Previous Message Thiemo Kellner 2018-02-15 07:39:22 Slowly Changing Dimension implementation