Re: Promise index tuples for UPSERT - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Promise index tuples for UPSERT
Date
Msg-id CA+U5nML4YvbzbSZ9Hbv5=oXEk6L88j8Ykb51=tfxAi0eObCifQ@mail.gmail.com
Whole thread Raw
In response to Re: Promise index tuples for UPSERT  (Peter Geoghegan <pg@heroku.com>)
Responses Re: Promise index tuples for UPSERT
List pgsql-hackers
On 3 October 2014 10:32, Peter Geoghegan <pg@heroku.com> wrote:
> On Fri, Oct 3, 2014 at 2:03 AM, Heikki Linnakangas
> <hlinnakangas@vmware.com> wrote:
>> That lowers the bar from what I thought everyone agreed on. Namely, if two
>> backends run a similar UPSERT command concurrently on a table that has more
>> than one unique constraint, they might deadlock, causing one of them to
>> throw an error instead of INSERTing or UPDATEing anything.
>
> It lowers the bar to a level that I am not willing to limbo dance
> under. You don't even need two unique constraints. Nothing as
> "complicated" as that is required.
>
> When this happens with MySQL, they have the good sense to call it a
> bug [1], and even fix it. I find the comparison with conventional
> insertion entirely unconvincing.

Is there a test case that demonstrates the problem?

-- Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Promise index tuples for UPSERT
Next
From: Peter Geoghegan
Date:
Subject: Re: Promise index tuples for UPSERT