Re: wake up logical workers after ALTER SUBSCRIPTION

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: wake up logical workers after ALTER SUBSCRIPTION
Дата
Msg-id 20221207181145.GA3698731@nathanxps13
обсуждение исходный текст
Ответ на Re: wake up logical workers after ALTER SUBSCRIPTION  (Melih Mutlu <m.melihmutlu@gmail.com>)
Ответы Re: wake up logical workers after ALTER SUBSCRIPTION  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: wake up logical workers after ALTER SUBSCRIPTION  (Amit Kapila <amit.kapila16@gmail.com>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [BUG] Logical replica crash if there was an error in a function.
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Transaction timeout