[prev] 14 [next]

PostgreSQL Functionality (cont)

Uses multi-version concurrency control (MVCC)
  • multiple "versions" of the database exist together
  • a transaction sees the version that was valid at its start-time
  • readers don't block writers; writers don't block readers
  • this significantly reduces the need for locking
Disadvantages of this approach:
  • extra storage for old versions of tuples   (vacuum fixes this)
  • need to check "visibility" of every tuple fetched

PostgreSQL also provides locking to enforce critical concurrency.