Configuration parameter

deadlock_timeout — PostgreSQL Configuration Parameter

Category Locks Default 1s Unit time (ms/s/min) Change scope Superuser / reload

Wait before checking for a deadlock.

At a glance

Property Value
Parameter deadlock_timeout
Category Locks
Default 1s
Value type time (ms/s/min)
Change scope Superuser / reload

What it does

How long a lock wait lasts before the server runs deadlock detection. Detection is expensive, so it is deferred this long.

How to apply a change

Can be changed at runtime by a superuser for the current session, or globally via reload.

Inspect the current value and source with SHOW deadlock_timeout; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'deadlock_timeout';.

Tuning guidance

Rarely change. If you raise it to reduce detection overhead, raise log_lock_waits awareness too; lowering it makes deadlock detection more eager but costlier.

Reference

PostgreSQL documentation — Locks configuration.

Was this helpful?

← All configuration parameters