Re: Documenting serializable vs snapshot isolation levels - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Documenting serializable vs snapshot isolation levels
Date
Msg-id 26455.1230922071@sss.pgh.pa.us
Whole thread Raw
In response to Re: Documenting serializable vs snapshot isolation levels  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: Documenting serializable vs snapshot isolation levels  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
>> What do you mean by referential integrity?  I don't believe you can
>> construct a foreign key problem at any transaction isolation level.
> I mean that if someone attempts to maintain referential integrity with
> SQL code, without using explicit locks, it is not reliable. 
> Presumably the implementation of foreign keys in PostgreSQL takes this
> into account and blocks the kind of behavior shown below.  This
> behavior would not occur with true serializable transactions.

IIRC the RI code has to fudge the normal serializable-snapshot behavior
in order to guarantee no constraint violation --- it has to be aware of
concurrent changes that would otherwise be invisible to a serializable
transaction.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Significantly larger toast tables on 8.4?
Next
From: "Alex Hunsaker"
Date:
Subject: Re: Significantly larger toast tables on 8.4?