Skip to content

Commit d0ca92c

Browse files
committed
Correct erroneous explanation of DEADLOCK_TIMEOUT configuration setting.
1 parent 44eaafe commit d0ca92c

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

doc/src/sgml/runtime.sgml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.15 2000/07/16 14:47:57 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.16 2000/07/17 22:32:44 tgl Exp $
33
-->
44

55
<Chapter Id="runtime">
@@ -374,8 +374,8 @@ Is the postmaster running at 'localhost' and accepting connections on Unix socke
374374
<para>
375375
One way to set these options is to create a file
376376
<filename>postgresql.conf</filename> in the data directory (e.g.,
377-
<filename>/usr/local/pgsql/data</filename>). An example of how
378-
this file could look like is this:
377+
<filename>/usr/local/pgsql/data</filename>). An example of what
378+
this file could look like is:
379379
<programlisting>
380380
# This is a comment
381381
log_connections = yes
@@ -829,15 +829,22 @@ env PGOPTIONS='--geqo=off' psql
829829
<term>DEADLOCK_TIMEOUT (<type>integer</type>)</term>
830830
<listitem>
831831
<para>
832-
<productname>Postgres</productname> assumes that if
833-
transactions are stuck for this many milliseconds then a
834-
deadlock has occurred. Although it is technically possible to
835-
detect deadlocks <quote>properly</quote>, the present
836-
optimistic approach is much more efficient in practice. If you get
837-
too many deadlock detected messages when you provably did not
838-
have one, you might want to try raising this value. The
839-
default is 1000 (i.e., one second). This option can only be
840-
set at server start.
832+
This is the amount of time, in milliseconds, to wait on a lock
833+
before checking to see if there is a deadlock condition or not.
834+
The check for deadlock is relatively slow, so we don't want to
835+
run it every time we wait for a lock. We (optimistically?)
836+
assume that deadlocks are not common in production applications,
837+
and just wait on the lock for awhile before starting to ask
838+
questions about whether it can ever get unlocked.
839+
Increasing this value reduces the amount of time wasted in
840+
needless deadlock checks, but slows down reporting of real deadlock
841+
errors. The default is 1000 (i.e., one second), which is probably
842+
about the smallest value you would want in practice. On a heavily
843+
loaded server you might want to raise it. Ideally the setting
844+
should exceed your typical transaction time, so as to improve the
845+
odds that the lock will be released before the waiter decides to
846+
check for deadlock.
847+
This option can only be set at server start.
841848
</para>
842849
</listitem>
843850
</varlistentry>
@@ -889,7 +896,8 @@ env PGOPTIONS='--geqo=off' psql
889896
<para>
890897
Determines how many concurrent connections the database server
891898
will allow. The default is 32. There is also a compiled-in
892-
hard upper limit on this option, which is currently 1024. This
899+
hard upper limit on this value, which is typically 1024
900+
(both numbers can be altered when compiling the server). This
893901
parameter can only be set at server start.
894902
</para>
895903
</listitem>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy