[prev] 34 [next]

Concurrency Control in PostgreSQL (cont)

PostgreSQL provides read committed and serializable isolation levels.

Using the serializable isolation level, a select:

  • sees only data committed before the transaction began
  • never sees changes made by concurrent transactions
Using the serializable isolation level, an update fails:
  • if it tries to modify an "active" data item
    (active = affected by some other tx, either committed or uncommitted)
The transaction containing the update must then rollback and re-start.