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

From: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} 2.0
Date: 2015-02-02 16:09:22
Message-ID: CAEzk6ffVWWR0t4eepDC6qBRAQbDjwX=VQP5Z-dVOcx369QjE1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2 February 2015 at 14:32, Geoff Winkless <pgsqladmin(at)geoff(dot)dj> wrote:
> Mmmf. So I would have to make sure that my source tuples were unique
> before doing the INSERT (otherwise the first ON CONFLICT UPDATE for a
> tuple would block any other)? That's potentially very slow :(

Replying to my own message, because it occurs to me I might be being
stupid (surely not :) )

When you say "this will still lock the unmodified row" did you mean
just that it's locked to _other_ processes until commit? That would be
much less impactful.

Geoff

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2015-02-02 16:39:17 Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} 2.0
Previous Message Robert Haas 2015-02-02 15:54:01 Re: Release note bloat is getting out of hand