Re: scalability bottlenecks with (many) partitions (and more) - Mailing list pgsql-hackers

From Andres Freund
Subject Re: scalability bottlenecks with (many) partitions (and more)
Date
Msg-id vgtms7b5egxdypmknxpobocqton3puhprk3ahhk45rcx4uyl33@6uetxejsc75r
Whole thread Raw
In response to Re: scalability bottlenecks with (many) partitions (and more)  (Tomas Vondra <tomas@vondra.me>)
Responses Re: scalability bottlenecks with (many) partitions (and more)
List pgsql-hackers
Hi,

On 2025-03-04 14:05:22 +0100, Tomas Vondra wrote:
> On 3/3/25 21:52, Andres Freund wrote:
> >> It's not a proper constant, of course, but it seemed close
> >> enough. Yes, it might confuse people into thinking it's a constant, or
> >> is there some additional impact?
> > 
> > That seems plenty. I just looked at the shem sizing function and was confused
> > because I didn't see where the max_locks_per_transaction affects the
> > allocation size.
> > 
> 
> But the shmem sizing doesn't use FP_LOCK_SLOTS_PER_BACKEND at all, both
> proc.c and postinit.c use the "full" formula, not the macro

Not sure what I brainfarted there...


> >> The one fix I can think of is making it look more like a function,
> >> possibly just like this:
> >>
> >> #define    FastPathLockSlotsPerBackend() \
> >>   (FP_LOCK_SLOTS_PER_GROUP * FastPathLockGroupsPerBackend)
> >>
> >> Or do you have another suggestion?
> > 
> > That'd work for me.
> > 
> 
> Attached is a patch doing this, but considering it has nothing to do
> with the shmem sizing, I wonder if it's worth it.

Yes.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: scalability bottlenecks with (many) partitions (and more)
Next
From: vignesh C
Date:
Subject: Re: Add an option to skip loading missing publication to avoid logical replication failure