Re: Thoughts about NUM_BUFFER_PARTITIONS

From: wenhui qiu <qiuwenhuifx(at)gmail(dot)com>
To: Japin Li <japinli(at)hotmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Thoughts about NUM_BUFFER_PARTITIONS
Date: 2024-02-20 01:36:45
Message-ID: CAGjGUAL4uQAaA-Q3QJL4oR5Hf_2s2Z+Hapx0e2Cz8UL+V_s0Ww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Japlin Li
Thank you for such important information ! Got it

Japin Li <japinli(at)hotmail(dot)com> 于2024年2月19日周一 10:26写道:

>
> On Mon, 19 Feb 2024 at 00:56, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
> wrote:
> > On 2/18/24 03:30, Li Japin wrote:
> >>
> >> I find it seems need to change MAX_SIMUL_LWLOCKS if we enlarge the
> NUM_BUFFER_PARTITIONS,
> >> I didn’t find any comments to describe the relation between
> MAX_SIMUL_LWLOCKS and
> >> NUM_BUFFER_PARTITIONS, am I missing someghing?
> >
> > IMHO the relationship is pretty simple - MAX_SIMUL_LWLOCKS needs to be
> > higher than NUM_BUFFER_PARTITIONS, so that the backend can acquire all
> > the partition locks if needed.
> >
>
> Thanks for the explanation! Got it.
>
> > There's other places that acquire a bunch of locks, and all of them need
> > to be careful not to exceed MAX_SIMUL_LWLOCKS. For example gist has
> > GIST_MAX_SPLIT_PAGES.
> >
> >
> > regards
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message wenhui qiu 2024-02-20 02:16:00 Re: Thoughts about NUM_BUFFER_PARTITIONS
Previous Message Euler Taveira 2024-02-20 01:28:17 Re: speed up a logical replica setup