Re: Promise index tuples for UPSERT

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)2ndquadrant(dot)com>
Subject: Re: Promise index tuples for UPSERT
Date: 2014-10-03 10:04:42
Message-ID: CA+U5nML4YvbzbSZ9Hbv5=oXEk6L88j8Ykb51=tfxAi0eObCifQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3 October 2014 10:32, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> On Fri, Oct 3, 2014 at 2:03 AM, Heikki Linnakangas
> <hlinnakangas(at)vmware(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2014-10-03 10:05:55 Re: Promise index tuples for UPSERT
Previous Message Peter Geoghegan 2014-10-03 09:57:06 Re: Promise index tuples for UPSERT