Re: Perform streaming logical transactions by background workers and parallel apply

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Perform streaming logical transactions by background workers and parallel apply
Дата
Msg-id CAA4eK1LicXnvd2uNJFHc7UHLGZWGcqYkzyV+DmbBuO5Qcg3TaA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Perform streaming logical transactions by background workers and parallel apply  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: Perform streaming logical transactions by background workers and parallel apply  (Masahiko Sawada <sawada.mshk@gmail.com>)
Список pgsql-hackers
On Wed, Dec 7, 2022 at 10:10 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
> On Wed, Dec 7, 2022 at 1:29 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> > Right, but the leader will anyway exit at some point either due to an
> > ERROR like "lost connection ... to parallel worker" or with a LOG
> > like: "... will restart because of a parameter change" but I see your
> > point. So, will it be better if we have a LOG message here and then
> > proc_exit()? Do you have something else in mind for this?
>
> No, I was thinking that too. It's better to write a LOG message and do
> proc_exit().
>
> Regarding the error "lost connection ... to parallel worker", it could
> still happen depending on the timing even if the parallel worker
> cleanly exits due to parameter changes, right? If so, I'm concerned
> that it could lead to disable the subscription unexpectedly if
> disable_on_error is enabled.
>

If we want to avoid this then I think we have the following options
(a) parallel apply skips checking parameter change (b) parallel worker
won't exit on parameter change but will silently absorb the parameter
and continue its processing; anyway, the leader will detect it and
stop the worker for the parameter change

Among these, the advantage of (b) is that it will allow reflecting the
parameter change (that doesn't need restart) in the parallel worker.
Do you have any better idea to deal with this?

-- 
With Regards,
Amit Kapila.



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

Предыдущее
От: Peter Smith
Дата:
Сообщение: Re: PGDOCS - Logical replication GUCs - added some xrefs
Следующее
От: Pavel Luzanov
Дата:
Сообщение: Re: add \dpS to psql