Re: Simplify some logical replication worker type checking - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Simplify some logical replication worker type checking
Date
Msg-id CAA4eK1JViFS5-TL6hGwBz_V60UBnV1cnc_29GYDuBUndX=1jpQ@mail.gmail.com
Whole thread Raw
In response to Re: Simplify some logical replication worker type checking  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Simplify some logical replication worker type checking
List pgsql-hackers
On Tue, Aug 1, 2023 at 12:11 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> On 2023-Aug-01, Peter Smith wrote:
>
> > PSA a small patch making those above-suggested changes. The 'make
> > check' and TAP subscription tests are all passing OK.
>
> I think the code ends up more readable with this style of changes, so
> +1.  I do wonder if these calls should appear in a proc_exit callback or
> some such instead, though.
>

But the call to
ApplyLauncherForgetWorkerStartTime()->logicalrep_launcher_attach_dshmem()
has some dynamic shared memory allocation/attach calls which I am not
sure is a good idea to do in proc_exit() callbacks. We may want to
evaluate whether moving the suggested checks to proc_exit or any other
callback is a better idea. What do you think?

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Adding a LogicalRepWorker type field
Next
From: Amit Kapila
Date:
Subject: Re: Adding a LogicalRepWorker type field