Hi,
On Thu, Dec 21, 2023 at 02:29:05PM +0100, Laurenz Albe wrote:
> Here is a patch to implement this.
> Being stuck behind a lock for more than a second is almost
> always a problem, so it is reasonable to turn this on by default.
I also think that this should be set to on.
I had a look at the patch and it works fine. Regarding the
documentation, maybe the back-reference at deadlock_timeout could be
made a bit more explicit then as well, as in the attached patch, but
this is mostly bikeshedding.
Michael
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 6d975ef7ab..7f9bdea50b 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -10185,11 +10185,12 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
</para>
<para>
- When <xref linkend="guc-log-lock-waits"/> is set,
- this parameter also determines the amount of time to wait before
- a log message is issued about the lock wait. If you are trying
- to investigate locking delays you might want to set a shorter than
- normal <varname>deadlock_timeout</varname>.
+ When <xref linkend="guc-log-lock-waits"/> is set to
+ <literal>on</literal> (which is the default), this parameter also
+ determines the amount of time to wait before a log message is issued
+ about the lock wait. If you are trying to investigate locking delays
+ you might want to set a shorter than normal
+ <varname>deadlock_timeout</varname>.
</para>
</listitem>
</varlistentry>