Re: A contradiction in 13.2.1
От | Hannes Erven |
---|---|
Тема | Re: A contradiction in 13.2.1 |
Дата | |
Msg-id | 56A9489D.5000003@erven.at обсуждение исходный текст |
Ответ на | A contradiction in 13.2.1 (Dane Foster <studdugie@gmail.com>) |
Список | pgsql-general |
Dane, > So the mental model I've built based on the first four sentences of > the first paragraph is that when a transaction starts in read > committed mode a snapshot is taken of the (database) universe as it > exists at the moment of its creation and that it's only updated by > changes made by the transaction that created the snapshot. This is (almost) true for the REPEATABLE READ or SERIALIZABLE modes. (However, the snapshot is taken as the first non-transaction-control statement in the transaction starts.) For "READ COMMITTED", the docs read (emphasis added): "In effect, a SELECT query sees a snapshot of the database as of the instant the *query* begins to run. However, SELECT does see the effects of previous updates executed within its own transaction, even though they are not yet committed." ( http://www.postgresql.org/docs/9.5/static/transaction-iso.html#XACT-READ-COMMITTED ) So if you re-run the same query multiple times within a single transaction, you might get different results depending. best regards, -hannes
В списке pgsql-general по дате отправления: