Re: Adding a LogicalRepWorker type field

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Adding a LogicalRepWorker type field
Дата
Msg-id CAA4eK1JtazrkKGvozvB3NY6Pof4TdmTyKW47QjN+kO9vOkGJzQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Adding a LogicalRepWorker type field  (Peter Smith <smithpb2250@gmail.com>)
Ответы Re: Adding a LogicalRepWorker type field  (Peter Smith <smithpb2250@gmail.com>)
Список pgsql-hackers
On Tue, Aug 8, 2023 at 1:39 PM Peter Smith <smithpb2250@gmail.com> wrote:
>
> On Fri, Aug 4, 2023 at 5:45 PM Peter Smith <smithpb2250@gmail.com> wrote:
>
> v4-0001 uses only 3 simple inline functions. Callers always pass
> parameters as Bharath had suggested.
>

*
- Assert(am_leader_apply_worker());
+ Assert(is_leader_apply_worker(MyLogicalRepWorker));
...
- if (am_leader_apply_worker())
+ if (is_leader_apply_worker(MyLogicalRepWorker))

Passing everywhere MyLogicalRepWorker not only increased the code
change footprint but doesn't appear any better to me. Instead, let
am_parallel_apply_worker() keep calling
isParallelApplyWorker(MyLogicalRepWorker) as it is doing now. I feel
even if you or others feel that is a better idea, we can debate it
separately after the main patch is done because as far as I understand
that is not the core idea of this proposal.

* If you do the above then there won't be a need to change the
variable name is_parallel_apply_worker in logicalrep_worker_launch.

--
With Regards,
Amit Kapila.



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Incorrect handling of OOM in WAL replay leading to data loss
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Handle infinite recursion in logical replication setup