Re: foreign key locks, 2nd attempt

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Noah Misch <noah@leadboat.com>
Cc: Alvaro Herrera <alvherre@commandprompt.com>, Tom Lane <tgl@sss.pgh.pa.us>, Simon Riggs <simon@2ndquadrant.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-03-13T17:09:57Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Try to avoid running with a full fsync request queue.

On Mon, Mar 12, 2012 at 9:24 PM, Noah Misch <noah@leadboat.com> wrote:
> When we lock an update-in-progress row, we walk the t_ctid chain and lock all
> descendant tuples.  They may all have uncommitted xmins.  This is essential to
> ensure that the final outcome of the updating transaction does not affect
> whether the locking transaction has its KEY SHARE lock.  Similarly, when we
> update a previously-locked tuple, we copy any locks (always KEY SHARE locks)
> to the new version.  That new tuple is both uncommitted and has locks, and we
> cannot easily sacrifice either property.  Do you see a way to extend your
> scheme to cover these needs?

No, I think that sinks it.  Good analysis.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company