Re: BUG #12330: ACID is broken for unique constraints

From: Greg Stark <stark(at)mit(dot)edu>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, "nikita(dot)y(dot)volkov(at)mail(dot)ru" <nikita(dot)y(dot)volkov(at)mail(dot)ru>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BUG #12330: ACID is broken for unique constraints
Date: 2014-12-29 15:44:57
Message-ID: CAM-w4HO=k+U061bKLx=Uvf81J9Oak3_a1xc8S5mYBsD_--WoWQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Mon, Dec 29, 2014 at 3:31 PM, Merlin Moncure <mmoncure(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nikita Volkov 2014-12-29 15:48:53 Re: BUG #12330: ACID is broken for unique constraints
Previous Message Merlin Moncure 2014-12-29 15:31:46 Re: BUG #12330: ACID is broken for unique constraints

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikita Volkov 2014-12-29 15:48:53 Re: BUG #12330: ACID is broken for unique constraints
Previous Message Merlin Moncure 2014-12-29 15:31:46 Re: BUG #12330: ACID is broken for unique constraints