Re: 9.1/9.2 SERIALIZABLE: expected serialization failure between INSERT and SELECT not encountered

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Craig Ringer *EXTERN*" <ringerc(at)ringerc(dot)id(dot)au>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: 9.1/9.2 SERIALIZABLE: expected serialization failure between INSERT and SELECT not encountered
Date: 2012-10-18 07:10:15
Message-ID: D960CB61B694CF459DCFB4B0128514C2089027E9@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Craig Ringer wrote:
> > Why? They can be serialized. The outcome would be exactly the same
> > if session 2 completed before session 1 began.
>
> Hmm. Good point; so long as *either* ordering is valid it's fine, it's
> only when *both* orderings are invalid that a serialization failure
> would occur. For some reason I had myself thinking that if a conflict
> could occur in either ordering the tx would fail, which wouldn't
really
> be desirable and isn't how it works.
>
> BTW, the issue with the underlying question is that their "name"
column
> is unique. They expected to get a serialization failure on duplicate
> insert into "name", not a unique constraint violation. The question
> wasn't "why doesn't this fail" but "Why does this fail with a
different
> error than I expected". Not that the question made that particularly
clear.

But the unasked question is also answered, right?

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Angelico 2012-10-18 07:22:57 Re: 9.1/9.2 SERIALIZABLE: expected serialization failure between INSERT and SELECT not encountered
Previous Message Albe Laurenz 2012-10-18 07:07:16 Re: Improve MMO Game Performance