aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorNathan Bossart <nathan@postgresql.org>2024-06-03 12:10:43 -0500
committerNathan Bossart <nathan@postgresql.org>2024-06-03 12:10:43 -0500
commit4ebe51a5fbc3e08861db85fe3868c31c6bc8ed59 (patch)
tree60cd5715f0cfad0e4144040a13dc4de38f667fed /doc/src
parent8fea1bd5411b793697a4c9087c403887e050c4ac (diff)
downloadpostgresql-4ebe51a5fbc3e08861db85fe3868c31c6bc8ed59.tar.gz
postgresql-4ebe51a5fbc3e08861db85fe3868c31c6bc8ed59.zip
Fix documentation for System V semaphores.
The formulas for SEMMNI and SEMMNS do not include the archiver process, which was converted to an auxiliary process in v14, and the WAL summarizer process, which was introduced in v17. This commit corrects these formulas and adds a missing reference to max_wal_senders nearby. Since this section of the documentation tends to be incorrect quite often, we should likely give up on documenting the exact formulas in favor of something less fragile, but that is left as a future exercise. Reported-by: Sami Imseih Reviewed-by: Sami Imseih Discussion: https://postgr.es/m/20240517164452.GA1914161%40nathanxps13 Backpatch-through: 12
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/runtime.sgml9
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml
index 6047b8171d4..883a849e6f5 100644
--- a/doc/src/sgml/runtime.sgml
+++ b/doc/src/sgml/runtime.sgml
@@ -781,13 +781,13 @@ psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such
<row>
<entry><varname>SEMMNI</varname></entry>
<entry>Maximum number of semaphore identifiers (i.e., sets)</entry>
- <entry>at least <literal>ceil((max_connections + autovacuum_max_workers + max_wal_senders + max_worker_processes + 5) / 16)</literal> plus room for other applications</entry>
+ <entry>at least <literal>ceil((max_connections + autovacuum_max_workers + max_wal_senders + max_worker_processes + 7) / 16)</literal> plus room for other applications</entry>
</row>
<row>
<entry><varname>SEMMNS</varname></entry>
<entry>Maximum number of semaphores system-wide</entry>
- <entry><literal>ceil((max_connections + autovacuum_max_workers + max_wal_senders + max_worker_processes + 5) / 16) * 17</literal> plus room for other applications</entry>
+ <entry><literal>ceil((max_connections + autovacuum_max_workers + max_wal_senders + max_worker_processes + 7) / 16) * 17</literal> plus room for other applications</entry>
</row>
<row>
@@ -838,7 +838,8 @@ psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such
When using System V semaphores,
<productname>PostgreSQL</productname> uses one semaphore per allowed connection
(<xref linkend="guc-max-connections"/>), allowed autovacuum worker process
- (<xref linkend="guc-autovacuum-max-workers"/>) and allowed background
+ (<xref linkend="guc-autovacuum-max-workers"/>), allowed WAL sender process
+ (<xref linkend="guc-max-wal-senders"/>), and allowed background
process (<xref linkend="guc-max-worker-processes"/>), in sets of 16.
Each such set will
also contain a 17th semaphore which contains a <quote>magic
@@ -852,7 +853,7 @@ psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such
linkend="sysvipc-parameters"/>). The parameter <varname>SEMMNI</varname>
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 <literal>ceil((max_connections + autovacuum_max_workers + max_wal_senders + max_worker_processes + 5) / 16)</literal>.
+ least <literal>ceil((max_connections + autovacuum_max_workers + max_wal_senders + max_worker_processes + 7) / 16)</literal>.
Lowering the number
of allowed connections is a temporary workaround for failures,
which are usually confusingly worded <quote>No space