You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: doc/src/sgml/runtime.sgml
+5-4
Original file line number
Diff line number
Diff line change
@@ -781,13 +781,13 @@ psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such
781
781
<row>
782
782
<entry><varname>SEMMNI</varname></entry>
783
783
<entry>Maximum number of semaphore identifiers (i.e., sets)</entry>
784
-
<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>
784
+
<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>
785
785
</row>
786
786
787
787
<row>
788
788
<entry><varname>SEMMNS</varname></entry>
789
789
<entry>Maximum number of semaphores system-wide</entry>
790
-
<entry><literal>ceil((max_connections + autovacuum_max_workers + max_wal_senders + max_worker_processes + 5) / 16) * 17</literal> plus room for other applications</entry>
790
+
<entry><literal>ceil((max_connections + autovacuum_max_workers + max_wal_senders + max_worker_processes + 7) / 16) * 17</literal> plus room for other applications</entry>
791
791
</row>
792
792
793
793
<row>
@@ -838,7 +838,8 @@ psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such
838
838
When using System V semaphores,
839
839
<productname>PostgreSQL</productname> uses one semaphore per allowed connection
840
840
(<xref linkend="guc-max-connections"/>), allowed autovacuum worker process
841
-
(<xref linkend="guc-autovacuum-max-workers"/>) and allowed background
841
+
(<xref linkend="guc-autovacuum-max-workers"/>), allowed WAL sender process
842
+
(<xref linkend="guc-max-wal-senders"/>), and allowed background
842
843
process (<xref linkend="guc-max-worker-processes"/>), in sets of 16.
843
844
Each such set will
844
845
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
852
853
linkend="sysvipc-parameters"/>). The parameter <varname>SEMMNI</varname>
853
854
determines the limit on the number of semaphore sets that can
854
855
exist on the system at one time. Hence this parameter must be at
0 commit comments