Glossary — in plain language

LOCALLOCK

Also called: local lock table, per-backend lock cache

In plain English

A LOCALLOCK is a backend’s private tuple/" title="Tuple">record of the locks it currently holds and how many times it has acquired each. Before touching any shared memory, a backend checks this local table; if it already holds the requested lock, the request is satisfied locally with no shared-memory work at all.

Why it matters

Re-acquiring an already-held lock is extremely common (nested function calls, repeated access to the same table), and LOCALLOCK makes that path nearly free. It is the first of three tiers — LOCALLOCK, then the fast-path, then the shared lock table — that keep normal locking cheap.

Was this helpful?

← Browse the full glossary