Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} 2.0 - Mailing list pgsql-hackers

From Geoff Winkless
Subject Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} 2.0
Date
Msg-id CAEzk6ffVWWR0t4eepDC6qBRAQbDjwX=VQP5Z-dVOcx369QjE1A@mail.gmail.com
Whole thread Raw
In response to Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} 2.0  (Geoff Winkless <pgsqladmin@geoff.dj>)
List pgsql-hackers
On 2 February 2015 at 14:32, Geoff Winkless <pgsqladmin@geoff.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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Release note bloat is getting out of hand
Next
From: Heikki Linnakangas
Date:
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} 2.0