Re: BUG #12330: ACID is broken for unique constraints - Mailing list pgsql-hackers

From Greg Stark
Subject Re: BUG #12330: ACID is broken for unique constraints
Date
Msg-id CAM-w4HO=k+U061bKLx=Uvf81J9Oak3_a1xc8S5mYBsD_--WoWQ@mail.gmail.com
Whole thread Raw
In response to Re: BUG #12330: ACID is broken for unique constraints  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: BUG #12330: ACID is broken for unique constraints  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-hackers
On Mon, Dec 29, 2014 at 3:31 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
> In that case: we don't agree.  How come duplicate key errors would be
> reported as serialization failures but not RI errors (for example,
> inserting a record pointing to another record which a concurrent
> transaction deleted)?

The key question is not the type of error but whether the transaction
saw another state previously. That is, if you select to check for
duplicate keys, don't see any, and then try to insert and get a
duplicate key error that would be easy to argue is a serialization
error. The same could be true for an RI check -- if you select some
data and then insert a record that refers to the data you already
verified existed and get an RI failure then you could consider that a
serialization failure.


-- 
greg



pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: BUG #12330: ACID is broken for unique constraints
Next
From: Guillaume Lelarge
Date:
Subject: Publish autovacuum informations