Re: upgrade using logical replication

From: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
To: Mohamed Wael Khobalatte <mkhobalatte(at)grubhub(dot)com>
Cc: Michael Lewis <mlewis(at)entrata(dot)com>, Atul Kumar <akumar14871(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: upgrade using logical replication
Date: 2021-01-21 01:25:39
Message-ID: CAB8KJ=jKpCO-utWjrujJAjj4m2B13nT-O+w0R=f4qtR5YYv1zg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2021年1月21日(木) 9:19 Mohamed Wael Khobalatte <mkhobalatte(at)grubhub(dot)com>:

>
>
> On Wed, Jan 20, 2021 at 2:37 PM Michael Lewis <mlewis(at)entrata(dot)com> wrote:
>
>> Using pg_upgrade takes minutes for an in place upgrade. If you can allow
>> 1+ hour of downtime, it seems overly complicated to use logical replication.
>>
>
> I suppose the Atul's issue is what to do with the replicas. Once he does
> pg_upgrade, then he will need to provision new ones, no? I suppose in this
> case logical would be better, with the new instance itself having replicas.
> I haven't done it, and it's gonna require some setup time, definitely much
> longer than pg_upgrade then make do with one server until your new physical
> replicas are set up.
>

The replicas will need to be set up at some point anyway; with logical
replication the new cluster is ready to go once the new primary is fully
"seeded" (and the new replicas have caught up with that). Switchover can
then
take place whenever convenient, with minimal downtime, more time for
testing,
and the possibility of switching back if issues are encountered.

Potential downsides to this approach are that the database schema may need
to be
modified to be suitable for logical replication, and additional resources
may be
needed to host the old and new clusters simultaneously during the migration
process.

Regards

Ian Barwick

--
EnterpriseDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2021-01-21 02:52:18 Re: upgrade using logical replication
Previous Message Tom Lane 2021-01-21 00:32:54 Re: See what options a Postgresql binary was compiled with