Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Craig Ringer <craig(at)2ndquadrant(dot)com>
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Date: 2014-09-25 19:38:54
Message-ID: CAM3SWZQ9CL8eijiav8K_TqxB2aLL665Gy1Cdt9jdRQSXLxsfug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 25, 2014 at 7:12 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> The way forwards, in my view, is to define precisely the behaviour we
> wish to have. That definition will include the best current mechanism
> for running an UPSERT using INSERT/UPDATE/loops and comparing that
> against what is being provided here. We will then have a functional
> test of equivalence of the approaches, and a basis for making a
> performance test that shows that performance is increased without any
> loss of concurrency.

That sounds very reasonable. While I'm sure that what I have here can
decisively beat the xact looping pattern in terms of performance as
measured by pgbench, the real performance advantage is that this
approach doesn't burn through XIDs. That was a concern that Andres
highlighted in relation to using the subxact looping pattern with
BDR's multi-master replication conflict resolution.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2014-09-25 19:54:16 Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]
Previous Message Peter Geoghegan 2014-09-25 19:31:04 Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}