select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

SYSTEM CATALOGS / STATISTICS VIEWS

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

Development snapshot. These definitions may change before release.

Kind
Statistics views
Columns in this snapshot
5
Definition source
English manual

Columns 5

ColumnTypeDescription / reference
locktypetextType of the lockable object. See pg_locks for details.
waitsbigintNumber 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_timedouble precisionTotal 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_exceededbigintNumber 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. See Section 13.3.1.1 for which locks are eligible for fast-path locking; for ineligible lock types this counter is always zero.
stats_resettimestamp with time zoneTime at which these statistics were last reset.
Column history across versions
Version history 2
  1. PG 19 → 20changed
  2. PG 18 → 19added

Definition snapshot: english-manuals:e5d3429f40d4bb52f707e1e9d58… · English manual source