Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2f66e29

Browse files
committed
Correct the formulas for System V IPC parameters SEMMNI and SEMMNS in docs.
In runtime.sgml, the old formulas for calculating the reasonablevalues of SEMMNI and SEMMNS were incorrect. They have forgotten tocount the number of semaphores which both the checkpointer process(introduced in 9.2) and the background worker processes (introducedin 9.3) need.This commit fixes those formulas so that they count the number ofsemaphores which the checkpointer process and the background workerprocesses need.Report and patch by Kyotaro Horiguchi. Only the patch for 9.3 wasmodified by me. Back-patch to 9.2 where the checkpointer process wasadded and the number of needed semaphores was increased.Author: Kyotaro HoriguchiReviewed-by: Fujii MasaoBackpatch: 9.2Discussion:http://www.postgresql.org/message-id/20160203.125119.66820697.horiguchi.kyotaro@lab.ntt.co.jp
1 parentccbb01f commit2f66e29

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

‎doc/src/sgml/runtime.sgml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -645,13 +645,13 @@ psql: could not connect to server: No such file or directory
645645
<row>
646646
<entry><varname>SEMMNI</></>
647647
<entry>Maximum number of semaphore identifiers (i.e., sets)</>
648-
<entry>at least <literal>ceil((max_connections + autovacuum_max_workers +4) / 16)</literal></>
648+
<entry>at least <literal>ceil((max_connections + autovacuum_max_workers +max_worker_processes + 5) / 16)</literal></>
649649
</row>
650650

651651
<row>
652652
<entry><varname>SEMMNS</></>
653653
<entry>Maximum number of semaphores system-wide</>
654-
<entry><literal>ceil((max_connections + autovacuum_max_workers +4) / 16) * 17</literal> plus room for other applications</>
654+
<entry><literal>ceil((max_connections + autovacuum_max_workers +max_worker_processes + 5) / 16) * 17</literal> plus room for other applications</>
655655
</row>
656656

657657
<row>
@@ -699,20 +699,22 @@ psql: could not connect to server: No such file or directory
699699

700700
<para>
701701
<productname>PostgreSQL</> uses one semaphore per allowed connection
702-
(<xref linkend="guc-max-connections">) and allowed autovacuum worker
703-
process (<xref linkend="guc-autovacuum-max-workers">), in sets of 16.
702+
(<xref linkend="guc-max-connections">), allowed autovacuum worker process
703+
(<xref linkend="guc-autovacuum-max-workers">) and allowed background
704+
process (<xref linkend="guc-max-worker-processes">), in sets of 16.
704705
Each such set will
705706
also contain a 17th semaphore which contains a <quote>magic
706707
number</quote>, to detect collision with semaphore sets used by
707708
other applications. The maximum number of semaphores in the system
708709
is set by <varname>SEMMNS</>, which consequently must be at least
709710
as high as <varname>max_connections</> plus
710-
<varname>autovacuum_max_workers</>, plus one extra for each 16
711+
<varname>autovacuum_max_workers</> plus <varname>max_worker_processes</>,
712+
plus one extra for each 16
711713
allowed connections plus workers (see the formula in <xref
712714
linkend="sysvipc-parameters">). The parameter <varname>SEMMNI</>
713715
determines the limit on the number of semaphore sets that can
714716
exist on the system at one time. Hence this parameter must be at
715-
least <literal>ceil((max_connections + autovacuum_max_workers +4) / 16)</>.
717+
least <literal>ceil((max_connections + autovacuum_max_workers +max_worker_processes + 5) / 16)</>.
716718
Lowering the number
717719
of allowed connections is a temporary workaround for failures,
718720
which are usually confusingly worded <quote>No space

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp