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: Thu, 5 Jan 2023 09:19:33 -0800
Message-ID: <20230105171933.GB299579@nathanxps13> (raw)
In-Reply-To: <CAA4eK1JFgvhxV448uNTkKpQpGe+X8WRWtyf45h4vASEpNz3Gkw@mail.gmail.com>
References: <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>
	<20230105041237.GA189619@nathanxps13>
	<20230105044622.GA256534@nathanxps13>
	<CAA4eK1JFgvhxV448uNTkKpQpGe+X8WRWtyf45h4vASEpNz3Gkw@mail.gmail.com>

On Thu, Jan 05, 2023 at 11:34:37AM +0530, Amit Kapila wrote:
> On Thu, Jan 5, 2023 at 10:16 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
>> In v12, I moved the restart for two_phase mode to the end of
>> process_syncing_tables_for_apply() so that we don't need to rely on another
>> iteration of the loop.
> 
> This should work but it is better to add a comment before calling
> CommandCounterIncrement() to indicate that this is for making changes
> to the relation state visible.

Will do.

> Thinking along similar lines, won't apply worker need to be notified
> of SUBREL_STATE_SYNCWAIT state change by the tablesync worker?

wait_for_worker_state_change() should notify the apply worker in this case.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (77+ messages)  latest in thread

Message-ID: <20230105171933.GB299579@nathanxps13>
Permalink:  ../20230105171933.GB299579@nathanxps13/
Also on:    postgresql.org/message-id/20230105171933.GB299579@nathanxps13

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: <20230105171933.GB299579@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