Re: Lost replication slots after pg_upgrade.

From: John DeSoi <desoi(at)pgedit(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Nikhil Shetty <nikhil(dot)dba04(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-08 21:11:49
Message-ID: 3CC0BC49-3376-4CDA-A133-C0A142BC6A88@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


> 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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Nikhil Shetty 2022-02-09 04:36:23 Re: Lost replication slots after pg_upgrade.
Previous Message Axel Rau 2022-02-08 17:25:36 Re: restarting logical replication after upgrading standby