Re: foreign key locks, 2nd attempt
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Simon Riggs <simon@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Noah Misch <noah@leadboat.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-03-16T03:08:29Z
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 →
-
Try to avoid running with a full fsync request queue.
- 7f242d880b5b 9.1.0 cited
On Thu, Mar 15, 2012 at 11:04:06PM -0400, Bruce Momjian wrote: > On Tue, Mar 13, 2012 at 02:35:02PM -0300, Alvaro Herrera wrote: > > > > Excerpts from Bruce Momjian's message of mar mar 13 14:00:52 -0300 2012: > > > > > > On Tue, Mar 06, 2012 at 04:39:32PM -0300, Alvaro Herrera wrote: > > > > > > 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". > > > > I'm not sure what's your point. We've had a "hint" bit for SELECT FOR > > UPDATE for ages. Even 8.2 had HEAP_XMAX_EXCL_LOCK and > > HEAP_XMAX_SHARED_LOCK. Maybe they are misnamed and aren't really > > "hints", but it's not the job of this patch to fix that problem. > > Now I am confused. Where do you see the word "hint" used by > HEAP_XMAX_EXCL_LOCK and HEAP_XMAX_SHARED_LOCK. These are tuple infomask > bits, not hints, meaning they are not optional or there just for > performance. Are you saying that the bit is only a guide and is there only for performance? If so, I understand why it is called "hint". -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +