summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorTom Lane2025-04-29 21:27:52 +0000
committerTom Lane2025-04-29 21:27:52 +0000
commit810a8b1c8051d4e8822967a96f133692698386de (patch)
tree95557fceb2608201a39948722ce69a21e81bd3f3 /src/backend
parente974f1c2164bc677d55f98edaf99f80c0b6b89d9 (diff)
Give up on running with NetBSD/OpenBSD's default semaphore settings.
This reverts commit 38da053463bef32adf563ddee5277d16d2b6c5af, which attempted to preserve our ability to start with only 60 semaphores. Subsequent changes (particularly 55b454d0e) have put that idea pretty much permanently out of reach: people wishing to use Postgres v18 on OpenBSD or NetBSD will have no choice but to increase those platforms' default values of SEMMNI and SEMMNS. Hence, revert 38da05346's changes in SEMAS_PER_SET and the minimum tested value of max_connections. Adjust a comment from the subsequent patch 6d0154196, and tweak the wording in runtime.sgml to make it clear that changing SEMMNI/SEMMNS is no longer even a little bit optional on these platforms. Although 38da05346 was later back-patched into v17, leave that branch alone: it's still capable of starting with 60 semaphores, and there's no reason to break that. Author: Tom Lane <[email protected]> Reviewed-by: Nathan Bossart <[email protected]> Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/port/sysv_sema.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/backend/port/sysv_sema.c b/src/backend/port/sysv_sema.c
index f7c8638aec5..423b2b4f9d6 100644
--- a/src/backend/port/sysv_sema.c
+++ b/src/backend/port/sysv_sema.c
@@ -50,14 +50,8 @@ typedef int IpcSemaphoreId; /* semaphore ID returned by semget(2) */
* we allocate. It must be *less than* your kernel's SEMMSL (max semaphores
* per set) parameter, which is often around 25. (Less than, because we
* allocate one extra sema in each set for identification purposes.)
- *
- * The present value of 19 is chosen with one eye on NetBSD/OpenBSD's default
- * SEMMNS setting of 60. Remembering the extra sema per set, this lets us
- * allocate three sets with 57 useful semaphores before exceeding that, which
- * is enough to run our core regression tests. Users of those systems will
- * still want to raise SEMMNS for any sort of production work, though.
*/
-#define SEMAS_PER_SET 19
+#define SEMAS_PER_SET 16
#define IPCProtection (0600) /* access/modify by user only */