From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Adding a LogicalRepWorker type field |
Date: | 2023-08-11 10:10:35 |
Message-ID: | CAHut+Psp4wwaLXY8acWmHGRX8e+s3VvB+GRTFj3Wdj2U_akmdw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Aug 11, 2023 at 7:33 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Thu, Aug 10, 2023 at 7:50 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
> >
> > >
> > > * 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.
> > >
> >
> > Done.
> >
>
> I don't think the addition of two new macros isTablesyncWorker() and
> isLeaderApplyWorker() adds much value, so removed those and ran
> pgindent. I am planning to commit this patch early next week unless
> you or others have any comments.
>
Thanks for considering this patch fit for pushing.
Actually, I recently found 2 more overlooked places in the launcher.c
code which can benefit from using the isTablesyncWorker(w) macro that
was removed in patch v6-0001.
I have posted another v7. (v7-0001 is identical to v6-0001). The
v7-0002 patch has the isTablesyncWorker changes. I think wherever
possible it is better to check the worker-type via macro instead of
deducing it by fields like 'relid', and patch v7-0002 makes the code
more consistent with other nearby isParallelApplyWorker checks in
launcher.c
------
Kind Regards,
Peter Smith.
Fujitsu Australia
Attachment | Content-Type | Size |
---|---|---|
v7-0002-Add-isTablesyncWorker.patch | application/octet-stream | 1.8 KB |
v7-0001-Simplify-determining-logical-replication-worker-t.patch | application/octet-stream | 7.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | vignesh C | 2023-08-11 10:56:26 | Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication |
Previous Message | Juan José Santamaría Flecha | 2023-08-11 09:48:18 | Re: Inconsistent results with libc sorting on Windows |