| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> | 
|---|---|
| To: | Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com> | 
| Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: wake up logical workers after ALTER SUBSCRIPTION | 
| Date: | 2022-12-07 18:11:45 | 
| Message-ID: | 20221207181145.GA3698731@nathanxps13 | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Wed, Dec 07, 2022 at 02:07:11PM +0300, Melih Mutlu wrote:
> Do we also need to wake up all sync workers too? Even if not, I'm not
> actually sure whether doing that would harm anything though.
> Just asking since currently the patch wakes up all workers including sync
> workers if any still exists.
After sleeping on this, I think we can do better.  IIUC we can simply check
for AllTablesyncsReady() at the end of process_syncing_tables_for_apply()
and wake up the logical replication workers (which should just consiѕt of
setting the current process's latch) if we are ready for two_phase mode.
-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
| Attachment | Content-Type | Size | 
|---|---|---|
| v8-0001-wake-up-logical-workers-as-needed-instead-of-rely.patch | text/x-diff | 6.4 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2022-12-07 18:23:37 | Re: Transaction timeout | 
| Previous Message | Andres Freund | 2022-12-07 18:03:26 | Re: [BUG] Logical replica crash if there was an error in a function. |