Re: BUG #9301: INSERT WHERE NOT EXISTS on table with UNIQUE constraint in concurrent SERIALIZABLE transactions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: mscott(at)apple(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9301: INSERT WHERE NOT EXISTS on table with UNIQUE constraint in concurrent SERIALIZABLE transactions
Date: 2014-02-21 03:46:29
Message-ID: 14879.1392954389@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

mscott(at)apple(dot)com writes:
> -- The following seems to violate the fundamental guarantee of ISOLATION
> LEVEL SERIALIZABLE in that the two
> -- transactions below do not behave the same as if they were run serially.

I must be missing something ... what about the duplicate-key error is not
what you would expect if the two transactions had been run serially?

BTW, the fundamental guarantee is not what you said above. It is that
you will *either* get the same results as if the transactions had been
run in some unspecified serial order, *or* you will get a serialization
error. There is certainly no guarantee about which of these cases
ensues.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John R Pierce 2014-02-21 04:27:27 Re: Is there a Support Platforms document more current that this?
Previous Message Haribabu Kommi 2014-02-21 03:26:27 Re: Is there a Support Platforms document more current that this?