Skip to content
← Catalog atlas / pg_stat_lock

STATISTICS VIEW · Statistics view

pg_stat_lock

The pg_stat_lock view will contain one row for each lock type, showing cluster-wide locks statistics.

First seen PG 19Last seen PG 19Columns 5

Checked column by column against a PostgreSQL 19beta3 instance · Raw measurement record ↗

Columns PostgreSQL 19

pg_stat_lock
COLUMNTYPEDESCRIPTION
locktype text Type of the lockable object. See pg_locks for details.
waits bigint Number of times a lock of this type had to wait because of a conflicting lock. Only incremented when the lock was successfully acquired after waiting longer than deadlock_timeout.
wait_time double precision Total time spent waiting for locks of this type, in milliseconds. Only incremented when the lock was successfully acquired after waiting longer than deadlock_timeout.
fastpath_exceeded bigint Number of times a lock of this type could not be acquired via fast path because the fast path slot limit was exceeded. Increasing max_locks_per_transaction can reduce this number.
stats_reset timestamp with time zone Time at which these statistics were last reset.

Columns marked "implicit" are not included in SELECT *; some early statistics views are completed from same-version source, and the extra provenance is shown in the column description.

Column evolution matrix

Hover a cell for the column type
PresentAdded / type or attribute changeRemoved
COLUMN9.09.19.29.39.49.59.610111213141516171819
locktype
waits
wait_time
fastpath_exceeded
stats_reset

9.0 is the coverage baseline; a column already present in the baseline is not marked as added. The matrix aligns columns by name, so a rename appears as the old column removed and a new column added.

Evolution timeline

Changes between adjacent majors

PostgreSQL 19 ← 18Catalog added

+ locktype+ waits+ wait_time+ fastpath_exceeded+ stats_reset

Compare any two versions

Pick two versions to see added, removed, and retyped columns. The interactive comparison needs JavaScript; the evolution timeline reads fine without it.