Re: Phantom read example for new Repeatable Read level - Mailing list pgsql-general

From Kevin Grittner
Subject Re: Phantom read example for new Repeatable Read level
Date
Msg-id 20121109204239.77880@gmx.com
Whole thread Raw
In response to Phantom read example for new Repeatable Read level  (Durumdara <durumdara@gmail.com>)
List pgsql-general
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


pgsql-general by date:

Previous
From: Durumdara
Date:
Subject: Phantom read example for new Repeatable Read level
Next
From: Eliot Gable
Date:
Subject: Re: Out of Shared Memory: max_locks_per_transaction