Re: wake up logical workers after ALTER SUBSCRIPTION
Melih Mutlu <m.melihmutlu@gmail.com>
From: Melih Mutlu <m.melihmutlu@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2022-12-07T11:07:11Z
Lists: pgsql-hackers
Hi, > Actually, that's not quite right. The sync worker will wake up the apply > worker to change the state from SYNCDONE to READY. AllTablesyncsReady() > checks that all tables are READY, so we need to wake up all the workers > when an apply worker changes the state to READY. Each worker will then > evaluate whether to restart for two_phase mode. > Right. I didn't think about the two phase case thoroughly. Waking up all apply workers can help. 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. Best, -- Melih Mutlu Microsoft
Commits
-
Avoid type cheats for invalid dsa_handles and dshash_table_handles.
- 3b4ac33254e1 16.0 landed
-
Track logrep apply workers' last start times to avoid useless waits.
- 5a3a95385bd5 16.0 landed
-
Check for two_phase change at end of process_syncing_tables_for_apply.
- 4c032dd8046b 16.0 landed
-
Wake up a subscription's replication worker processes after DDL.
- c6e1f62e2cee 16.0 landed