From: Bruce Momjian <bruce@momjian.us>
To: Ian Lawrence Barwick <barwick@gmail.com>
Cc: Mohamed Wael Khobalatte <mkhobalatte@grubhub.com>
Cc: Michael Lewis <mlewis@entrata.com>
Cc: Atul Kumar <akumar14871@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: upgrade using logical replication
Date: Wed, 20 Jan 2021 21:52:18 -0500
Message-ID: <20210121025218.GA3646@momjian.us> (raw)
In-Reply-To: <CAB8KJ=jKpCO-utWjrujJAjj4m2B13nT-O+w0R=f4qtR5YYv1zg@mail.gmail.com>
References: <CA+ONtZ5skiUizSBnHuMFkrqTXQDHFaZWEMgNq3i3EThnEURb1g@mail.gmail.com>
<CAHOFxGrBOZKvSFGmgmBACvRG5zdeD9=OOH3d11-hpKm4gj4z4Q@mail.gmail.com>
<CABZeWdwhQxPCfiWHyGKSZ-8zr_NpESkVXnEpYca27jkKK0-RFw@mail.gmail.com>
<CAB8KJ=jKpCO-utWjrujJAjj4m2B13nT-O+w0R=f4qtR5YYv1zg@mail.gmail.com>
On Thu, Jan 21, 2021 at 10:25:39AM +0900, Ian Lawrence Barwick wrote:
> 2021年1月21日(木) 9:19 Mohamed Wael Khobalatte <mkhobalatte@grubhub.com>:
>
>
>
> On Wed, Jan 20, 2021 at 2:37 PM Michael Lewis <mlewis@entrata.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.
pg_upgrade docs have instructions on how to upgrade replicas in place
using rsync with hard links.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: bruce@momjian.us, barwick@gmail.com, mkhobalatte@grubhub.com, mlewis@entrata.com, akumar14871@gmail.com
Subject: Re: upgrade using logical replication
In-Reply-To: <20210121025218.GA3646@momjian.us>
References: <CA+ONtZ5skiUizSBnHuMFkrqTXQDHFaZWEMgNq3i3EThnEURb1g@mail.gmail.com> <CAHOFxGrBOZKvSFGmgmBACvRG5zdeD9=OOH3d11-hpKm4gj4z4Q@mail.gmail.com> <CABZeWdwhQxPCfiWHyGKSZ-8zr_NpESkVXnEpYca27jkKK0-RFw@mail.gmail.com> <CAB8KJ=jKpCO-utWjrujJAjj4m2B13nT-O+w0R=f4qtR5YYv1zg@mail.gmail.com> <20210121025218.GA3646@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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