Re: Accommodate startup process in a separate ProcState array slot instead of in MaxBackends slots.

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Accommodate startup process in a separate ProcState array slot instead of in MaxBackends slots.
Date: 2021-10-12 06:46:07
Message-ID: CALj2ACV3JiU4-54Jt-v-YJf9a-b7ayeaXeW=vBcvXa5uZnnF=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 12, 2021 at 5:37 AM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
>
> On 2021/10/12 4:07, Bharath Rupireddy wrote:
> > Hi,
> >
> > While working on [1], it is found that currently the ProcState array
> > doesn't have entries for auxiliary processes, it does have entries for
> > MaxBackends. But the startup process is eating up one slot from
> > MaxBackends. We need to increase the size of the ProcState array by 1
> > at least for the startup process. The startup process uses ProcState
> > slot via InitRecoveryTransactionEnvironment->SharedInvalBackendInit.
> > The procState array size is initialized to MaxBackends in
> > SInvalShmemSize.
> >
> > The consequence of not fixing this issue is that the database may hit
> > the error "sorry, too many clients already" soon in
> > SharedInvalBackendInit.
> >
> > Attaching a patch to fix this issue. Thoughts?
>
> Thanks for making the patch! LGTM.
> Barring any objection, I will commit it.

Thanks for reviewing. I've made a CF entry for this, just to ensure
the tests on different CF bot server passes(and yes no failures) -
https://commitfest.postgresql.org/35/3355/

Regards,
Bharath Rupireddy.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2021-10-12 06:53:31 Re: Parallel vacuum workers prevent the oldest xmin from advancing
Previous Message Kyotaro Horiguchi 2021-10-12 06:42:23 Re: Allow escape in application_name