From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Noah Misch <noah(at)leadboat(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: foreign key locks, 2nd attempt |
Date: | 2012-03-13 17:00:52 |
Message-ID: | 20120313170052.GB9030@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Mar 06, 2012 at 04:39:32PM -0300, Alvaro Herrera wrote:
> Here's a first attempt at a README illustrating this. I intend this to
> be placed in src/backend/access/heap/README.tuplock; the first three
> paragraphs are stolen from the comment in heap_lock_tuple, so I'd remove
> those from there, directing people to this new file instead. Is there
> something that you think should be covered more extensively (or at all)
> here?
...
>
> When there is a single locker in a tuple, we can just store the locking info
> in the tuple itself. We do this by storing the locker's Xid in XMAX, and
> setting hint bits specifying the locking strength. There is one exception
> here: since hint bit space is limited, we do not provide a separate hint bit
> for SELECT FOR SHARE, so we have to use the extended info in a MultiXact in
> that case. (The other cases, SELECT FOR UPDATE and SELECT FOR KEY SHARE, are
> presumably more commonly used due to being the standards-mandated locking
> mechanism, or heavily used by the RI code, so we want to provide fast paths
> for those.)
Are those tuple bits actually "hint" bits? They seem quite a bit more
powerful than a "hint".
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2012-03-13 17:09:57 | Re: foreign key locks, 2nd attempt |
Previous Message | David Fetter | 2012-03-13 15:24:47 | CREATE FOREGIN TABLE LACUNA |