Re: pg_upgrade and logical replication

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_upgrade and logical replication
Date: 2023-09-29 12:02:52
Message-ID: CAA4eK1+sM1eC6r0owE_V0devZOkAZEDndE935wUJY5iHY+J94A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 27, 2023 at 9:14 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Tue, Sep 26, 2023 at 09:40:48AM +0530, Amit Kapila wrote:
> > On Mon, Sep 25, 2023 at 11:43 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >> Sure, that's assuming that the publisher side is upgraded.
> >
> > At some point, user needs to upgrade publisher and subscriber could
> > itself have some publications defined which means the downstream
> > subscribers will have the same problem.
>
> Not always. I take it as a valid case that one may want to create a
> logical setup only for the sake of an upgrade, and trashes the
> publisher after a failover to an upgraded subscriber node after the
> latter has done a sync up of the data that's been added to the
> relations tracked by the publications while the subscriber was
> pg_upgrade'd.
>

Such a use case is possible to achieve even without this patch.
Sawada-San has already given an alternative to slightly tweak the
steps mentioned by Julien to achieve it. Also, there are other ways to
achieve it by slightly changing the steps. OTOH, it will create a
problem for normal logical replication set up after upgrade as
discused.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ерохин Денис Владимирович 2023-09-29 13:36:27 Fix receiving large legal tsvector from binary format
Previous Message Hayato Kuroda (Fujitsu) 2023-09-29 11:57:51 RE: [PoC] pg_upgrade: allow to upgrade publisher node