pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Nathan Bossart <nathandbossart@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Melih Mutlu <m.melihmutlu@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: wake up logical workers after ALTER SUBSCRIPTION
Date: Wed, 4 Jan 2023 20:12:37 -0800
Message-ID: <20230105041237.GA189619@nathanxps13> (raw )
In-Reply-To: <CAA4eK1KyddKF4O36vN+5vnV3UFeT7ogi9TaTYasxe5OY+jzpMg@mail.gmail.com >
References: <CAGPVpCTUuKyxB5f3exgDMBRTivbN5uHVkD=YfXmgznrdnwVOQw@mail.gmail.com >
<20221206192551.GA3078082@nathanxps13 >
<20221206212954.GA3403597@nathanxps13 >
<CAGPVpCTkdaOyBLXB435VXq0RA1cHLFQut7BPm6t8D4dsdiEXZQ@mail.gmail.com >
<20221207181145.GA3698731@nathanxps13 >
<CAA4eK1Kr+aAaKVwKgy3kyQzuTDuc+_ahEaaOMe3ZF4SyZQSG+Q@mail.gmail.com >
<20230103182155.GC204418@nathanxps13 >
<CAA4eK1+T1LqSRsYnwQ-FHLbRFJwedT2Bv0w6Fyz4fOAiWsaXoQ@mail.gmail.com >
<20230104173304.GA296349@nathanxps13 >
<CAA4eK1KyddKF4O36vN+5vnV3UFeT7ogi9TaTYasxe5OY+jzpMg@mail.gmail.com >
On Thu, Jan 05, 2023 at 09:09:12AM +0530, Amit Kapila wrote:
> On Wed, Jan 4, 2023 at 11:03 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
>> On Wed, Jan 04, 2023 at 09:41:47AM +0530, Amit Kapila wrote:
>> > If so, we probably also need to
>> > ensure that table_states_valid is marked false probably via
>> > invalidations so that we can get the latest state and then perform
>> > this check. I guess if we can do that then we can directly move the
>> > restart logic to the end.
>>
>> IMO this shows the advantage of just waking up the worker. It doesn't
>> change the apply worker's behavior besides making it more responsive.
>
> But there doesn't appear to be any guarantee that the result for
> AllTablesyncsReady() will change between the time it is invoked
> earlier in the function and at the place you have it in the patch.
> This is because the value of 'table_states_valid' may not have
> changed. So, how is this supposed to work?
The call to CommandCounterIncrement() should set table_states_valid to
false if needed.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
view thread (77+ messages) latest in thread
Message-ID: <20230105041237.GA189619@nathanxps13>
Permalink: ../20230105041237.GA189619@nathanxps13/
Also on: postgresql.org/message-id/20230105041237.GA189619@nathanxps13
copy link · copy postgr.es
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: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, amit.kapila16@gmail.com, m.melihmutlu@gmail.com, thomas.munro@gmail.com, kuroda.hayato@fujitsu.com
Subject: Re: wake up logical workers after ALTER SUBSCRIPTION
In-Reply-To: <20230105041237.GA189619@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox