Reference / Lock Modes / Table lock
Table lock · X
EXCLUSIVE
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.
× Conflicting modes
· Compatible modes
Commands acquiring this mode
| SQL command | Object, phase and conditions |
|---|---|
| REFRESH MATERIALIZED VIEW CONCURRENTLY | Lock the materialized view. Ordinary reads continue; only one refresh can run on that view at a time. Source |
| LOCK TABLE … IN EXCLUSIVE MODE | Request 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
- Manual source: explicit locking 753057e340da
- Table lock conflict definitions 753057e340da
- Row lock mode definitions 753057e340da
Source collection date: 2026-09-27.