↑↓ select ↵ open ⌫ change scope Open full search

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

Reference / Lock Modes / Table lock

Table lock · X

EXCLUSIVE

Current

Definition

Conflicts with the ROW SHARE, ROW EXCLUSIVE, SHARE UPDATE EXCLUSIVE, SHARE, SHARE ROW EXCLUSIVE, EXCLUSIVE, and ACCESS EXCLUSIVE lock modes. This mode allows only concurrent ACCESS SHARE locks, i.e., only reads from the table can proceed in parallel with a transaction holding this lock mode.

Acquired by REFRESH MATERIALIZED VIEW CONCURRENTLY.

Compatibility

Compare different transactions holding locks on the same table.

View the full compatibility matrices

Commands acquiring this mode

SQL commandObject, phase and conditions
REFRESH MATERIALIZED VIEW CONCURRENTLYLock the materialized view. Ordinary reads continue; only one refresh can run on that view at a time. Source
LOCK TABLE … IN EXCLUSIVE MODERequest this table mode explicitly. Omitting IN MODE defaults to ACCESS EXCLUSIVE. Source

Commands may acquire additional locks. See all command associations.

Other lock modes

Sources

PostgreSQL 18 · Sampled build REL_18_STABLE · 753057e340da. Conflicts, definitions and command associations refer to this fixed source build. SQL links retain the selected version.

Local English manual · Online manual

Pinned source files

Source collection date: 2026-09-27.