Bird
0
0

Which transaction isolation level in PostgreSQL prevents dirty reads but allows non-repeatable reads and phantom reads?

easy📝 Conceptual Q1 of 15
PostgreSQL - Transactions and Concurrency
Which transaction isolation level in PostgreSQL prevents dirty reads but allows non-repeatable reads and phantom reads?
ARead Uncommitted
BRead Committed
CRepeatable Read
DSerializable
Step-by-Step Solution
Solution:
  1. Step 1: Understand dirty reads

    Dirty reads occur when a transaction reads uncommitted changes from another transaction.
  2. Step 2: Identify isolation level preventing dirty reads but allowing others

    Read Committed prevents dirty reads but allows non-repeatable and phantom reads.
  3. Final Answer:

    Read Committed -> Option B
  4. Quick Check:

    Prevents dirty reads = Read Committed [OK]
Quick Trick: Read Committed blocks dirty reads but not phantoms [OK]
Common Mistakes:
  • Confusing Read Committed with Serializable
  • Thinking Read Uncommitted prevents dirty reads

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes