[14:36] <dtrebbien>
What are the conditions for encountering a serialization failure?
[14:36] <dtrebbien> ^ What are the conditions for encountering a
serialization failure?
[14:37] <dtrebbien> Is there a PostgreSQL dev who can identify
the conditions of a serialization failure?
[14:38] <peerce>
http://www.postgresql.org/docs/current/static/transaction-iso.html#XACT-SERIALIZABLE
[14:43] <dtrebbien> "any set of concurrent serializable
transactions will have the same effect as if they were run one at a
time"
[14:44] <dtrebbien> What are the rules that the PostgreSQL
engine follows?
[14:44] <dtrebbien> I.e. If a row is changed, does that trigger
a failure?
[14:44] <johto> the serializable isolation mode in 9.1 is really
complex
[14:45] <dtrebbien> I figured.
[14:45] <dtrebbien> I read, too, that the Serializable level was
somehow "fixed"
[14:45] <RhodiumToad> dtrebbien: prior to 9.1, the basic rule is
that if a transaction tries to change a row whose current value isn't
visible to it, that's a failure
[14:46] <dtrebbien> RhodiumToad: That's interesting.
[14:46] <dtrebbien> Also, accessing a value, right?
[14:46] <selenamarie> dtrebbien: in addition to what others
said, the basic premise behind it is detection of cycles of
dependencies
[14:47] <dtrebbien> Oh.
[14:50] <dtrebbien> Is it fair to say that in 9.1, the rules for
triggering an isolation level have been made more complex to
basically cut down on "false positive" serialization anomalies?
[14:51] <johto> they were made complex because the more simple
rulex didn't catch all serialization anomalies
[14:51] <dtrebbien> Ah! I see.
[14:51] <dtrebbien> So that's why the release notes said
"fixed".
[14:52] <RhodiumToad> dtrebbien: accessing a non-visible value
wasn't an error because it just got the value which was visible at
the time of the snapshot.
[14:53] <RhodiumToad> dtrebbien: read-only serializable queries
simply see a static state of the database as of their snapshot time.
[14:54] <RhodiumToad> dtrebbien: other than a small wrinkle with
TRUNCATE, all the serialization issues involve read/write queries
[15:03] <dtrebbien> RhodiumToad, johto, selenamarie, and peerce:
Would you mind if I posted a transcript of this conversation to Stack
Overflow?
[15:07] <selenamarie> dtrebbien: sure :)
[15:07] <dtrebbien> I don't know if it will help anyone. It
might.
[15:08] <selenamarie> dtrebbien: i posted my notes from Kevin
Grittner's talk on this here:
http://www.chesnok.com/daily/2011/03/24/raw-notes-from-kevin-grittners-talk-on-ssi/