Re: Simplify some logical replication worker type checking

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Simplify some logical replication worker type checking
Date: 2023-08-04 10:08:49
Message-ID: CAA4eK1LsVNUMxXzR0Y54rYFcbztOwhAMB_2c5az8+OV+Mpwk8Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 2, 2023 at 8:20 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Tue, Aug 1, 2023 at 12:11 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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?
>

I have pushed the existing patch but feel free to pursue further improvements.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message tender wang 2023-08-04 10:10:53 Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails
Previous Message Amit Langote 2023-08-04 10:05:47 Re: remaining sql/json patches