Information
The log_lock_waits setting specifies whether a log message is produced when a session waits longer than deadlock_timeout to acquire a lock. The setting should be enabled (set to on) unless otherwise directed by your organization's logging policy.
Rationale:
If this setting is disabled, it may be harder to determine if lock waits are causing poor performance or if a specially-crafted SQL is attempting to starve resources through holding locks for excessive amounts of time.
Solution
Execute the following SQL statement(s) to remediate this setting:
postgres=# alter system set log_lock_waits = 'on';
ALTER SYSTEM
postgres=# select pg_reload_conf();
pg_reload_conf
----------------
t
(1 row)
Default Value:
off