public inbox for [email protected]  
help / color / mirror / Atom feed
From: Nathan Bossart <[email protected]>
To: Amit Kapila <[email protected]>
Cc: [email protected]
Subject: Re: wake up logical workers after ALTER SUBSCRIPTION
Date: Wed, 23 Nov 2022 13:05:26 -0800
Message-ID: <20221123210526.GB368966@nathanxps13> (raw)
In-Reply-To: <CAA4eK1KzPvvGfK1mY3gvfsLEEWS+moRjWbmbGExLRQHM41P6YA@mail.gmail.com>
References: <20221122004119.GA132961@nathanxps13>
	<CAA4eK1KzPvvGfK1mY3gvfsLEEWS+moRjWbmbGExLRQHM41P6YA@mail.gmail.com>

On Tue, Nov 22, 2022 at 04:59:28PM +0530, Amit Kapila wrote:
> On Tue, Nov 22, 2022 at 6:11 AM Nathan Bossart <[email protected]> wrote:
>> While working on avoiding unnecessary wakeups in logical/worker.c (as was
>> done for walreceiver.c in 05a7be9), I noticed that the tests began taking
>> much longer.  This seems to be caused by the reduced frequency of calls to
>> maybe_reread_subscription() in LogicalRepApplyLoop().
> 
> I think it would be interesting to know why tests started taking more
> time after a reduced frequency of calls to
> maybe_reread_subscription(). IIRC, we anyway call
> maybe_reread_subscription for each xact.

At the moment, commands like ALTER SUBSCRIPTION don't wake up the logical
workers for the target subscription, so the next call to
maybe_reread_subscription() may not happen for a while.  Presently, we'll
only sleep up to a second in the apply loop, but with my new
prevent-unnecessary-wakeups patch, we may sleep for much longer.  This
causes wait_for_subscription_sync to take more time after some ALTER
SUBSCRIPTION commands.

-- 
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]
  Subject: Re: wake up logical workers after ALTER SUBSCRIPTION
  In-Reply-To: <20221123210526.GB368966@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