Transactions & ACID · SQL SQL

Which of the following phenomena can still occur under the 'Repeatable Read' isolation level in standard ANSI SQL, but is prevented in PostgreSQL's i…

Practice question from Transactions & ACID (SQL SQL), with the correct answer and a step-by-step solution.

hard · MCQ · Q-9D7AF1

Which of the following phenomena can still occur under the 'Repeatable Read' isolation level in standard ANSI SQL, but is prevented in PostgreSQL's implementation?

  1. A.Dirty Read
  2. B.Non-Repeatable Read
  3. C.Phantom ReadCorrect answer
  4. D.Lost Update

Solution

According to the ANSI SQL standard, Repeatable Read allows phantom reads (where a concurrent transaction inserts new rows matching a range query). However, PostgreSQL's Repeatable Read level uses SSI (Snapshot Isolation), which prevents phantom reads as well.

More from Transactions & ACID

All of Transactions & ACID

Practise more SQL

Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.

Start practising free

Free to start · No credit card needed