diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml
index 6d5b1082d2d..fba67a37c79 100644
--- a/doc/src/sgml/runtime.sgml
+++ b/doc/src/sgml/runtime.sgml
@@ -645,13 +645,13 @@ psql: could not connect to server: No such file or directory
SEMMNI>>
Maximum number of semaphore identifiers (i.e., sets)>
- at least ceil((max_connections + autovacuum_max_workers + 4) / 16)>
+ at least ceil((max_connections + autovacuum_max_workers + max_worker_processes + 5) / 16)>
SEMMNS>>
Maximum number of semaphores system-wide>
- ceil((max_connections + autovacuum_max_workers + 4) / 16) * 17 plus room for other applications>
+ ceil((max_connections + autovacuum_max_workers + max_worker_processes + 5) / 16) * 17 plus room for other applications>
@@ -699,20 +699,22 @@ psql: could not connect to server: No such file or directory
PostgreSQL> uses one semaphore per allowed connection
- () and allowed autovacuum worker
- process (), in sets of 16.
+ (), allowed autovacuum worker process
+ () and allowed background
+ process (), in sets of 16.
Each such set will
also contain a 17th semaphore which contains a magic
number
, to detect collision with semaphore sets used by
other applications. The maximum number of semaphores in the system
is set by SEMMNS>, which consequently must be at least
as high as max_connections> plus
- autovacuum_max_workers>, plus one extra for each 16
+ autovacuum_max_workers> plus max_worker_processes>,
+ plus one extra for each 16
allowed connections plus workers (see the formula in ). The parameter SEMMNI>
determines the limit on the number of semaphore sets that can
exist on the system at one time. Hence this parameter must be at
- least ceil((max_connections + autovacuum_max_workers + 4) / 16)>.
+ least ceil((max_connections + autovacuum_max_workers + max_worker_processes + 5) / 16)>.
Lowering the number
of allowed connections is a temporary workaround for failures,
which are usually confusingly worded No space