public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nathan Bossart <[email protected]>
To: Melih Mutlu <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: Hayato Kuroda (Fujitsu) <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: wake up logical workers after ALTER SUBSCRIPTION
Date: Tue, 6 Dec 2022 11:25:51 -0800
Message-ID: <20221206192551.GA3078082@nathanxps13> (raw)
In-Reply-To: <CAGPVpCTUuKyxB5f3exgDMBRTivbN5uHVkD=YfXmgznrdnwVOQw@mail.gmail.com>
References: <20221123205027.GA368966@nathanxps13>
<TYCPR01MB58703BC1BD6B1415CA4BAB7FF50F9@TYCPR01MB5870.jpnprd01.prod.outlook.com>
<20221127234528.GB878043@nathanxps13>
<20221130041028.GA1604177@nathanxps13>
<CA+hUKGJTQqnAAYAmdM9xkcs1e+5jOt34nvV622cY8cTmQcgVpA@mail.gmail.com>
<CA+hUKGJXO6LUn3wTf3s0Z8DvgbQROxPTnJDHCsQrhbr3pF3g8Q@mail.gmail.com>
<20221130050441.GA1677223@nathanxps13>
<20221202002130.GA2124877@nathanxps13>
<20221202192101.GB2277157@nathanxps13>
<CAGPVpCTUuKyxB5f3exgDMBRTivbN5uHVkD=YfXmgznrdnwVOQw@mail.gmail.com>
Thanks for reviewing!
On Tue, Dec 06, 2022 at 07:44:46PM +0300, Melih Mutlu wrote:
> Is it really necessary to wake logical workers up when renaming other than
> subscription or publication? address.objectId will be a valid subid only
> when renaming a subscription.
Oops, that is a mistake. I only meant to wake up the workers for ALTER
SUBSCRIPTION RENAME. I think I've fixed this in v6.
> - When the state is SYNCDONE and the apply worker has to wake up to change
> the state to READY.
>
> I think we already call logicalrep_worker_wakeup_ptr wherever it's needed
> for the above cases? What am I missing here?
IIUC we must restart all the apply workers for a subscription to enable
two_phase mode. It looks like finish_sync_worker() only wakes up its own
apply worker. I moved this logic to where the sync worker marks the state
as SYNCDONE and added a check that two_phase mode is pending. Even so,
there can still be unnecessary wakeups, but this adjustment should limit
them.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
view thread (46+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: wake up logical workers after ALTER SUBSCRIPTION
In-Reply-To: <20221206192551.GA3078082@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox