From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | bharath(dot)rupireddyforpostgres(at)gmail(dot)com |
Cc: | masao(dot)fujii(at)oss(dot)nttdata(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Inconsistency in startup process's MyBackendId and procsignal array registration with ProcSignalInit() |
Date: | 2021-10-13 00:16:57 |
Message-ID: | 20211013.091657.923651067666159775.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Tue, 12 Oct 2021 14:57:58 +0530, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote in
> On Tue, Oct 12, 2021 at 2:03 PM Kyotaro Horiguchi
> <horikyota(dot)ntt(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Bossart, Nathan | 2021-10-13 00:26:47 | Re: should we allow users with a predefined role to access pg_backend_memory_contexts view and pg_log_backend_memory_contexts function? |
Previous Message | Bossart, Nathan | 2021-10-13 00:06:32 | Re: BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable |