Thread: Phantom read example for new Repeatable Read level
Dear Everybody!
Can somebody show me an example for phantom read in "Repeatable Read" mode (in 9.1, new, serialized kind of isolation level)?
The help wrote that it is possible:
Repeatable read | Not possible | Not possible | Possible |
But I don't understand, why, and how.
C1, C2 are clients.
Every of them is in RR transaction.
What need to do in C1 to read C2's "phantom records"?
Can you show me the detailed steps?
Thanks for every info, help!
Best wishes: dd
Durumdara wrote: > Can somebody show me an example for phantom read in "Repeatable > Read" mode (in 9.1, new, serialized kind of isolation level)? The repeatable read isolation level did not change in 9.1. Phantom reads were not possible in repeatable read transactions either before or after 9.1. > The help wrote that it is possible: What help are you talking about? > What need to do in C1 to read C2's "phantom records"? It is not possible. Have you read the documentation on the topic?: http://www.postgresql.org/docs/9.1/interactive/transaction-iso.html | When you select the level Read Uncommitted you really get Read | Committed, and phantom reads are not possible in the PostgreSQL | implementation of Repeatable Read, so the actual isolation level | might be stricter than what you select. This is permitted by the | SQL standard: the four isolation levels only define which phenomena | must not happen, they do not define which phenomena must happen. If you want some practical examples of serialization anomalies which can occur at the repeatable read isolation level which are not possible at the serializable isolation level, see this Wiki page: http://wiki.postgresql.org/wiki/SSI -Kevin
Durumdara wrote: > What need to do in C1 to read C2's "phantom records"? After posting a reply I remembered another recent thread which was more-or-less on the same topic, but with a different slant. Perhaps you would also find that useful: http://archives.postgresql.org/pgsql-general/2012-11/msg00166.php -Kevin