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

From Simon Riggs
Subject Re: Promise index tuples for UPSERT
Date
Msg-id CA+U5nM+ZtyfzKC3YLwpoNsXH9hLaeqA-2468FGbuE0_hB=28Eg@mail.gmail.com
Whole thread Raw
In response to Re: Promise index tuples for UPSERT  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 7 October 2014 14:06, Robert Haas <robertmhaas@gmail.com> wrote:

>> Is there a way of detecting that we are updating a unique constraint
>> column and then applying the HW locking only in that case? Or can we
>> only apply locking when we have multiple unique constraints on a
>> table?
>> If so, I would withdraw any objection to the HW locking technique.
>
> I'm not up on the details of what Peter's patch does with heavyweight
> locking, but I'd say it this way: if the patch uses heavyweight
> locking routinely, that's probably not going to scale well[1].   If
> the patch detects possible conflicts and uses heavyweight locking only
> in those cases and for the specific purpose of untangling those
> conflicts, then that might well be OK.

Yes, what I meant, just more clearly phrased. Thanks for the link.

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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Dynamic LWLock tracing via pg_stat_lwlock (proof of concept)
Next
From: Robert Haas
Date:
Subject: Re: RLS - permissive vs restrictive