Skip to content

Commit 3674485

Browse files
author
Commitfest Bot
committed
[CF 4718] v2 - Set log_lock_waits=on by default
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/4718 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/[email protected] Author(s): Laurenz Albe
2 parents 06473f5 + dd8ab00 commit 3674485

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

doc/src/sgml/config.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7929,7 +7929,7 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
79297929
Controls whether a log message is produced when a session waits
79307930
longer than <xref linkend="guc-deadlock-timeout"/> to acquire a
79317931
lock. This is useful in determining if lock waits are causing
7932-
poor performance. The default is <literal>off</literal>.
7932+
poor performance. The default is <literal>on</literal>.
79337933
Only superusers and users with the appropriate <literal>SET</literal>
79347934
privilege can change this setting.
79357935
</para>

src/backend/storage/lmgr/proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ int LockTimeout = 0;
6060
int IdleInTransactionSessionTimeout = 0;
6161
int TransactionTimeout = 0;
6262
int IdleSessionTimeout = 0;
63-
bool log_lock_waits = false;
63+
bool log_lock_waits = true;
6464

6565
/* Pointer to this process's PGPROC struct, if any */
6666
PGPROC *MyProc = NULL;

src/backend/utils/misc/guc_parameters.dat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@
566566
{ name => 'log_lock_waits', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
567567
short_desc => 'Logs long lock waits.',
568568
variable => 'log_lock_waits',
569-
boot_val => 'false',
569+
boot_val => 'true',
570570
},
571571

572572
{ name => 'log_lock_failures', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',

src/backend/utils/misc/postgresql.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@
624624
# processes
625625
# %% = '%'
626626
# e.g. '<%u%%%d> '
627-
#log_lock_waits = off # log lock waits >= deadlock_timeout
627+
#log_lock_waits = on # log lock waits >= deadlock_timeout
628628
#log_lock_failures = off # log lock failures
629629
#log_recovery_conflict_waits = off # log standby recovery conflict waits
630630
# >= deadlock_timeout

0 commit comments

Comments
 (0)