RE: pg_createsubscriber: drop pre-existing subscriptions from the converted node - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: pg_createsubscriber: drop pre-existing subscriptions from the converted node
Date
Msg-id OSBPR01MB25528CE9E000B081BDBAE59EF5D72@OSBPR01MB2552.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: pg_createsubscriber: drop pre-existing subscriptions from the converted node  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: pg_createsubscriber: drop pre-existing subscriptions from the converted node
List pgsql-hackers
Dear Amit, Vingesh,

Thanks for giving comments!

> It seems disabling subscriptions on the primary can make the primary
> stop functioning for some duration of time. I feel we need some
> solution where after converting to subscriber, we disable and drop
> pre-existing subscriptions. One idea could be that we use the list of
> new subscriptions created by the tool such that any subscription not
> existing in that list will be dropped.

Previously I avoided coding like yours, because there is a room that converted
node can connect to another publisher. But per off-list discussion, we can skip
it by setting max_logical_replication_workers = 0. I refactored with the approach.
Note that the GUC is checked at verification phase, so an attribute is added to
start_standby_server() to select the workload.

Most of comments by Vignesh were invalidated due to the code change, but I hoped
I checked your comments were not reproduced. Also, 0001 was created to remove an
unused attribute.

> Shouldn't this be an open item for PG17?

Added this thread to wikipage.

Best Regards,
Hayato Kuroda
FUJITSU LIMITED
https://www.fujitsu.com/ 

Attachment

pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Adminpack removal
Next
From: jian he
Date:
Subject: Re: pgsql: Add more SQL/JSON constructor functions