0
votes

The REPEATABLE_READ transaction isolation level of PostgreSQL 12 prevents dirty reads, non-repeatable reads, and phantom reads. In contrast to the READ_COMMITTED isolation level, the REPEATABLE_READ isolation level prevents non-repatable reads and phantom reads.

I guess that this comes with a cost, otherwise one would just make both equal. How does postgres guarantee that those 3 read phenomena don't occur?