Repeatable Read Keeps One Snapshot
@prranitarora▲ 11 net votes
PostgreSQL REPEATABLE READ keeps the snapshot established by the first query for the rest of the transaction. A later commit from another transaction remains invisible until the reader ends. READ COMMITTED instead takes a fresh snapshot for each statement and sees newly committed data on its next query.
1 COMMENT
The snapshot is taken at the first query, not at
BEGIN, so a transaction that opens and waits before reading still sees data committed up to that first read. If you have hit a variant of this, share it below.