Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

Inconsistency in repeatable read

$
0
0

http://www.postgresql.org/docs/9.2/static/transaction-iso.html

The Repeatable Read mode provides a rigorous guarantee that each transaction sees a completely stable view of the database. However, this view will not necessarily always be consistent with some serial (one at a time) execution of concurrent transactions of the same level. For example, even a read only transaction at this level may see a control record updated to show that a batch has been completed but not see one of the detail records which is logically part of the batch because it read an earlier revision of the control record. Attempts to enforce business rules by transactions running at this isolation level are not likely to work correctly without careful use of explicit locks to block conflicting transactions.

Isn’t that a phantom read, which is not possible in repeatable read mode?

The documentation says that a query in a repeatble read transaction sees a snapshot as of the start of the transaction, then how could it be possible for a query to read inconsistent data?


Viewing all articles
Browse latest Browse all 1138

Trending Articles