From: Tom Lane <tgl@sss.pgh.pa.us>
To: mscott@apple.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #9301: INSERT WHERE NOT EXISTS on table with UNIQUE constraint in concurrent SERIALIZABLE transactions
Date: Thu, 20 Feb 2014 22:46:29 -0500
Message-ID: <14879.1392954389@sss.pgh.pa.us> (raw)
In-Reply-To: <20140221002001.29130.27157@wrigleys.postgresql.org>
References: <20140221002001.29130.27157@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
mscott@apple.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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, mscott@apple.com
Subject: Re: BUG #9301: INSERT WHERE NOT EXISTS on table with UNIQUE constraint in concurrent SERIALIZABLE transactions
In-Reply-To: <14879.1392954389@sss.pgh.pa.us>
References: <20140221002001.29130.27157@wrigleys.postgresql.org> <14879.1392954389@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox