Glossary — in plain language

pg_locks

Also called: lock view, pg_locks system view

In plain English

pg_locks is a system view exposing every lock currently held or awaited across the server: the object type, the relation, the lock mode, whether it was granted, and — importantly — a fastpath boolean showing whether the lock lives in a backend’s private fast-path slots or in the shared lock table.

Why it matters

It is the primary tool for diagnosing blocking and lock pressure. Joining it to pg_stat_activity shows who is blocking whom; the fastpath column reveals when a partition-heavy query has overflowed its fast-path slots into the contended shared table.

Was this helpful?

← Browse the full glossary