Reference / Lock Modes / Table lock
Table lock · AS
ACCESS SHARE
Definition
Conflicts with the ACCESS EXCLUSIVE lock mode only.
The SELECT command acquires a lock of this mode on referenced tables. In general, any query that only reads a table and does not modify it will acquire this lock mode.
Compatibility
Compare different transactions holding locks on the same table.
× Conflicting modes
Commands acquiring this mode
| SQL command | Object, phase and conditions |
|---|---|
| SELECT | Read referenced tables without a FOR locking clause. Source |
| COPY … TO | Read the source table. COPY (query) TO follows the locks required by that query. Source |
| LOCK TABLE … IN ACCESS SHARE MODE | Request this table mode explicitly. Omitting IN MODE defaults to ACCESS EXCLUSIVE. Source |
| ALTER TABLE … NO INHERIT (parent table) | Take ACCESS SHARE on the parent while removing inheritance. The altered child separately takes 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.