Re: Adding a LogicalRepWorker type field
| От | Amit Kapila |
|---|---|
| Тема | Re: Adding a LogicalRepWorker type field |
| Дата | |
| Msg-id | CAA4eK1KfDU_dPHs4SaLAEnd95EHTePv54TwOdDC0ayC0xOG4Hg@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Adding a LogicalRepWorker type field (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>) |
| Ответы |
Re: Adding a LogicalRepWorker type field
|
| Список | pgsql-hackers |
On Mon, Jul 31, 2023 at 3:25 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> On Mon, Jul 31, 2023 at 7:17 AM Peter Smith <smithpb2250@gmail.com> wrote:
> >
> > PROBLEM:
> >
> > IMO, deducing the worker's type by examining multiple different field
> > values seems a dubious way to do it. This maybe was reasonable enough
> > when there were only 2 types, but as more get added it becomes
> > increasingly complicated.
>
> +1 for being more explicit in worker types.
>
+1. BTW, do we need the below functions (am_tablesync_worker(),
am_leader_apply_worker()) after this work?
static inline bool
am_tablesync_worker(void)
{
- return OidIsValid(MyLogicalRepWorker->relid);
+ return isTablesyncWorker(MyLogicalRepWorker);
}
static inline bool
am_leader_apply_worker(void)
{
- return (!am_tablesync_worker() &&
- !isParallelApplyWorker(MyLogicalRepWorker));
+ return isLeaderApplyWorker(MyLogicalRepWorker);
}
--
With Regards,
Amit Kapila.
В списке pgsql-hackers по дате отправления: