diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/config.sgml | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 575b40b58df..8c520e1267b 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -5077,7 +5077,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; </indexterm> <listitem> <para> - Abort any statement that takes over the specified number of + Abort any statement that takes more than the specified number of milliseconds, starting from the time the command arrives at the server from the client. If <varname>log_min_error_statement</> is set to <literal>ERROR</> or lower, the statement that timed out will also be @@ -5086,8 +5086,42 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <para> Setting <varname>statement_timeout</> in - <filename>postgresql.conf</> is not recommended because it - affects all sessions. + <filename>postgresql.conf</> is not recommended because it would + affect all sessions. + </para> + </listitem> + </varlistentry> + + <varlistentry id="guc-lock-timeout" xreflabel="lock_timeout"> + <term><varname>lock_timeout</varname> (<type>integer</type>)</term> + <indexterm> + <primary><varname>lock_timeout</> configuration parameter</primary> + </indexterm> + <listitem> + <para> + Abort any statement that waits longer than the specified number of + milliseconds while attempting to acquire a lock on a table, index, + row, or other database object. The time limit applies separately to + each lock acquisition attempt. The limit applies both to explicit + locking requests (such as <command>LOCK TABLE</>, or <command>SELECT + FOR UPDATE</> without <literal>NOWAIT</>) and to implicitly-acquired + locks. If <varname>log_min_error_statement</> is set to + <literal>ERROR</> or lower, the statement that timed out will be + logged. A value of zero (the default) turns this off. + </para> + + <para> + Unlike <varname>statement_timeout</>, this timeout can only occur + while waiting for locks. Note that if <varname>statement_timeout</> + is nonzero, it is rather pointless to set <varname>lock_timeout</> to + the same or larger value, since the statement timeout would always + trigger first. + </para> + + <para> + Setting <varname>lock_timeout</> in + <filename>postgresql.conf</> is not recommended because it would + affect all sessions. </para> </listitem> </varlistentry> |