On Mon, Oct 21, 2019 at 12:21 PM Thomas Munro <thomas.mu...@gmail.com> wrote: > On Fri, Jun 21, 2019 at 6:52 AM Andres Freund <and...@anarazel.de> wrote: > > On 2019-06-20 14:20:27 -0400, Robert Haas wrote: > > > I am not convinced that we really need to GUC-ify this. How about > > > just bumping the value up from 2 to say 5? > > > > I'm not sure either. Although it's not great if the only way out for a > > user hitting this is to increase max_connections... But we should really > > increase the default. > > Ok, hard-to-explain GUC abandoned. Here is a patch that just adjusts > the two constants. DSM's array allows for 5 slots per connection (up > from 2), and DSA doubles its size after every two segments (down from > 4).
Pushed. No back-patch for now: the risk/reward ratio doesn't seem right for that. > I have a long wish list of improvements I'd like to investigate in > this area, subject for future emails, but while I'm making small > tweaks, here's another small thing: there is no "wait event" while > allocating (in the kernel sense) POSIX shm on Linux, unlike the > equivalent IO when file-backed segments are filled with write() calls. > Let's just reuse the same wait event, so that you can see what's going > on in pg_stat_activity. Also pushed.