Re: Lost replication slots after pg_upgrade.

From: Nikhil Shetty <nikhil(dot)dba04(at)gmail(dot)com>
To: John DeSoi <desoi(at)pgedit(dot)com>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Victor Sudakov <vas(at)sibptus(dot)ru>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Lost replication slots after pg_upgrade.
Date: 2022-02-09 04:36:23
Message-ID: CAFpL5Vx8N3ww37CNH28VfFes=vtRwymvRDo_2TBAY2PdXCSLug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi John,

Would it work as expected if before pg_upgrade on the standby:
> alter subscription my_subscription disable;
> alter subscription my_subscription set (slot_name = NONE);
> And then after pg_upgrade:
> alter subscription my_subscription enable;
> I have not tried it yet, but I thought this would be the simplest option.

We are using physical replication slots.

Thanks,
Nikhil

On Wed, Feb 9, 2022 at 2:41 AM John DeSoi <desoi(at)pgedit(dot)com> wrote:

>
> > On Feb 8, 2022, at 2:08 AM, Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:
> >
> > Because pg_upgrade modifies your primary instance in such a way that a
> standby
> > can't simply keep replicating from it.
>
> Would it work as expected if before pg_upgrade on the standby:
>
> alter subscription my_subscription disable;
> alter subscription my_subscription set (slot_name = NONE);
>
> And then after pg_upgrade:
>
> alter subscription my_subscription enable;
>
> I have not tried it yet, but I thought this would be the simplest option.
>
> John DeSoi, Ph.D.
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message John DeSoi 2022-02-09 13:57:03 Re: restarting logical replication after upgrading standby
Previous Message John DeSoi 2022-02-08 21:11:49 Re: Lost replication slots after pg_upgrade.