pgconfigurator
pgconfigurator

log_lock_waits

No restart — reload (superuser)tuned by pgconfiguratorboolean (on/off)

Logs a statement that waited longer than deadlock_timeout for a lock.

What pgconfigurator would set
32 GB · 8 vCPU · NVMe · OLTP
Computing…
Tune for your exact server → /tunecomputed in your browser · nothing uploaded

What it does

With log_lock_waits on, any session that waits for a lock longer than deadlock_timeout gets a log entry naming the lock and the blocker. It's the go-to setting for diagnosing contention and 'why is this query hanging'.

How to tune it

Turn it on in production — lock waits are a common, hard-to-reproduce source of latency. It piggybacks on deadlock_timeout (default 1 s), so it only logs genuinely stuck waits, not every brief one.

Related parameters