Re: pg_upgrade and logical replication - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: pg_upgrade and logical replication
Date
Msg-id ZRDpCNgrD1-7KwQS@paquier.xyz
Whole thread Raw
In response to Re: pg_upgrade and logical replication  (Michael Paquier <michael@paquier.xyz>)
Responses RE: pg_upgrade and logical replication
List pgsql-hackers
On Wed, Sep 20, 2023 at 09:38:56AM +0900, Michael Paquier wrote:
> And this code path is used to start postmaster instances for old and
> new clusters.  So it seems to me that it is incorrect if this is not
> conditional based on the cluster version.

Avoiding the startup of bgworkers during pg_upgrade is something that
worries me a bit, actually, as it could be useful in some cases like
monitoring?  That would be fancy, for sure..  For now and seeing a
lack of consensus on this larger matter, I'd like to propose a check
for IsBinaryUpgrade into ApplyLauncherRegister() instead as it makes
no real sense to start apply workers in this context.  That would be
equivalent to max_logical_replication_workers = 0.

Amit, Vignesh, would the attached be OK for both of you?

(Vignesh has posted a slightly different version of this patch on a
different thread, but the subscriber part should be part of this
thread with the subscribers, I assume.)
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Doesn't pgstat_report_wal() handle the argument "force" incorrectly
Next
From: Peter Smith
Date:
Subject: Re: Synchronizing slots from primary to standby