At Tue, 12 Oct 2021 14:57:58 +0530, Bharath Rupireddy 
<bharath.rupireddyforpostg...@gmail.com> wrote in 
> On Tue, Oct 12, 2021 at 2:03 PM Kyotaro Horiguchi
> <horikyota....@gmail.com> wrote:
> > > [1] - 
> > > https://www.postgresql.org/message-id/CALj2ACXZ_o7rcOb7-Rs96P0d%3DEi%2Bnvf_WZ-Meky7Vv%2BnQNFYjQ%40mail.gmail.com
> >
> > The patch does this:
> >
> >                 case StartupProcess:
> > +                       MyBackendId = MaxBackends + MyAuxProcType + 1;
> >
> > as well as this:
> >
> > +       shmInvalBuffer->maxBackends = MaxBackends + 1;
> >
> > These don't seem to be in the strict correspondence.  I'd prefer
> > something like the following.
> >
> > +   /* currently only StartupProcess uses nailed SI slot */
> > +       shmInvalBuffer->maxBackends = MaxBackends + StartupProcess + 1;
> 
> I don't think it is a good idea to use macro StartupProcess (because
> the macro might get changed to a different value later). What we

If wo, we shouldn't use MyAuxProcType at the "case StartupProcess".

> essentially need to do for procState array is to extend its size by 1
> (for startup process) which is being handled separately in [1]. Once
> the patch at [1] gets in, the patch proposed here will not have the
> above change at all.
> 
> [1] -  
> https://www.postgresql.org/message-id/CALj2ACXZ_o7rcOb7-Rs96P0d%3DEi%2Bnvf_WZ-Meky7Vv%2BnQNFYjQ%40mail.gmail.com

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


Reply via email to