We have defaults for System V semaphores that feel old. While in theory they are set in kernel configs, in practice they are driven by the default in sys/shm.h. Those values date from November 14, 1993, and thus are surely from 4.4BSD Lite2, or 4.4BSD Lite (don't remember the USL purge details -- but the point is that they are 30 years old).
PostgreSQL 18 needs more than our defaults. I think pgsql running smoothly is more important than maintaining ancient limits. Back in 1993 I had a spiffy computer that had 12 MB of RAM, bought to run 386BSD 0.1 and then I ran NetBSD 0.8. I say that to calibrate our sense of resource usgae. On the theory that if a value was appropriate in 1993, 5x that value is totally fine in 2026. If a machine has less than 60 MB of RAM, then lower might be warranted -- but on such a machine one would be building custom kernels and ripping out everything that isn't neceesary anyway. Therefore: I propose to change SEMMNI from 10 to 32. I propose to change SEMMNS from 60 to 256. The concept would be, as it is now, that individual ports or kernel configs could just set these to lower values, if that's appropriate. I would then propose to pull this up to 11, 10, and maybe if I get to it before 11.0_RELEASE, 9. I am not suggesting this should make 11 release - it is not actually a huge problem, and users can set the variables with a sysctl. I just did # sysctl -w kern.ipc.semmni=32 kern.ipc.semmni: 10 -> 32 # sysctl -w kern.ipc.semmns=256 kern.ipc.semmns: 60 -> 256 on a machine with a mere 5000 MB of RAM, and it didn't blink. (The resizing code is both awesome and scary.) I'll do this on 22 July, barring objections.
