Concurrency Control in PostgreSQL
PostgreSQL uses two styles of concurrency control:
- multi-version concurrency control (MVCC)
(used in implementing SQL DML statements (e.g. select ))
- two-phase locking (2PL)
(used in implementing SQL DDL statements (e.g. create table ))
From the SQL (PLpgSQL) level:
- can let the lock/MVCC system handle concurrency
- can handle it explicitly via
LOCK statements
|