Re: wake up logical workers after ALTER SUBSCRIPTION
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Melih Mutlu <m.melihmutlu@gmail.com>, Thomas Munro <thomas.munro@gmail.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2023-01-10T05:29:14Z
Lists: pgsql-hackers
On Sat, Jan 7, 2023 at 6:15 AM Nathan Bossart <nathandbossart@gmail.com> wrote: > > On Fri, Jan 06, 2023 at 05:31:26PM -0500, Tom Lane wrote: > > > Attached is a rebased 0003, just to keep the cfbot happy. > > I'm kind of wondering whether 0003 is worth the complexity TBH, > > but in any case I ran out of time to look at it closely today. > > Yeah. It's not as bad as I was expecting, but it does add a bit more > complexity than is probably warranted. > Personally, I think it is not as complex as we were initially thinking and does the job accurately unless we are missing something. So, +1 to proceed with this approach. I haven't looked in detail but isn't it better to explain somewhere in the comments that it achieves to rate limit the restart of workers in case of error and allows them to restart immediately in case of subscription parameter change? Another minor point: Don't we need to set the launcher's latch after removing the entry from the hash table to avoid the launcher waiting on the latch for a bit longer? -- With Regards, Amit Kapila.
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