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

Commit597f7e3

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 parent851636b commit597f7e3

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
@@ -680,13 +680,13 @@ psql: could not connect to server: No such file or directory
680680
<row>
681681
<entry><varname>SEMMNI</></>
682682
<entry>Maximum number of semaphore identifiers (i.e., sets)</>
683-
<entry>at least <literal>ceil((max_connections + autovacuum_max_workers +4) / 16)</literal></>
683+
<entry>at least <literal>ceil((max_connections + autovacuum_max_workers +max_worker_processes + 5) / 16)</literal></>
684684
</row>
685685

686686
<row>
687687
<entry><varname>SEMMNS</></>
688688
<entry>Maximum number of semaphores system-wide</>
689-
<entry><literal>ceil((max_connections + autovacuum_max_workers +4) / 16) * 17</literal> plus room for other applications</>
689+
<entry><literal>ceil((max_connections + autovacuum_max_workers +max_worker_processes + 5) / 16) * 17</literal> plus room for other applications</>
690690
</row>
691691

692692
<row>
@@ -734,20 +734,22 @@ psql: could not connect to server: No such file or directory
734734

735735
<para>
736736
<productname>PostgreSQL</> uses one semaphore per allowed connection
737-
(<xref linkend="guc-max-connections">) and allowed autovacuum worker
738-
process (<xref linkend="guc-autovacuum-max-workers">), in sets of 16.
737+
(<xref linkend="guc-max-connections">), allowed autovacuum worker process
738+
(<xref linkend="guc-autovacuum-max-workers">) and allowed background
739+
process (<xref linkend="guc-max-worker-processes">), in sets of 16.
739740
Each such set will
740741
also contain a 17th semaphore which contains a <quote>magic
741742
number</quote>, to detect collision with semaphore sets used by
742743
other applications. The maximum number of semaphores in the system
743744
is set by <varname>SEMMNS</>, which consequently must be at least
744745
as high as <varname>max_connections</> plus
745-
<varname>autovacuum_max_workers</>, plus one extra for each 16
746+
<varname>autovacuum_max_workers</> plus <varname>max_worker_processes</>,
747+
plus one extra for each 16
746748
allowed connections plus workers (see the formula in <xref
747749
linkend="sysvipc-parameters">). The parameter <varname>SEMMNI</>
748750
determines the limit on the number of semaphore sets that can
749751
exist on the system at one time. Hence this parameter must be at
750-
least <literal>ceil((max_connections + autovacuum_max_workers +4) / 16)</>.
752+
least <literal>ceil((max_connections + autovacuum_max_workers +max_worker_processes + 5) / 16)</>.
751753
Lowering the number
752754
of allowed connections is a temporary workaround for failures,
753755
which are usually confusingly worded <quote>No space

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp