Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE
Date: 2013-09-22 02:25:11
Message-ID: CAM3SWZSJ_Oc5VLfXqAtUafNTzQKrfsR5RTWVKfvOfZkFCxCrig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Sep 21, 2013 at 7:22 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> So because this isn't a tuple-level lock - it's really a value-level
> lock - LockTuple() is not called by the btree code at all, and so
> arbitration of who gets the lock is, as I've said, essentially
> undefined.

Addendum: It isn't even a value-level lock, because the buffer locks
are of course released before the XactLockTableWait() call. It's a
simple attempt to acquire a shared lock on an xid.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2013-09-22 02:48:34 Re: VMs for Reviewers Available
Previous Message Peter Geoghegan 2013-09-22 02:22:56 Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE