Re: foreign key locks, 2nd attempt - Mailing list pgsql-hackers

From Robert Haas
Subject Re: foreign key locks, 2nd attempt
Date
Msg-id CA+TgmoYA4HdOTm-w7g73=NYXC4m5SYJMYtxazO67aKWOHOxv3g@mail.gmail.com
Whole thread Raw
In response to Re: foreign key locks, 2nd attempt  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: foreign key locks, 2nd attempt
Next
From: Bruce Momjian
Date:
Subject: Re: Website stylesheet for local docs