All Questions
Postgresql hard

How does PostgreSQL implement `SERIALIZABLE` isolation while maintaining high concurrency without resorting to traditional table-level locking?

  1. A It uses a centralized 'Lock Manager' that assigns unique epoch-based timestamps to every incoming row.
  2. B It uses Predicate Locks (SIREAD) to detect read-write dependencies and aborts conflicting cycles.
  3. C It forces all transactions into a single-threaded background queue to prevent any possible overlaps.
  4. D It leverages the hardware's L1 cache to perform atomic compares on individual memory addresses.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions