PostgreSQL DBA

Locking, Concurrency & Transactions

Question

A transaction reads a row, another transaction commits an update, then it reads again; which isolation level preserves the original view?

Answer

Use Repeatable Read. Start and finish the related work in one transaction; be prepared to retry if concurrent updates cause a serialization failure.

This is 10 of 23 free samples for PostgreSQL DBA.

More PostgreSQL DBA topic samples