Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>,
Mahendra Singh Thalor <mahi6run@gmail.com>, Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, Masahiko Sawada <masahiko.sawada@2ndquadrant.com>,
Masahiko Sawada <sawada.mshk@gmail.com>, Michael Paquier <michael@paquier.xyz>,
Mithun Cy <mithun.cy@enterprisedb.com>, Thomas Munro <thomas.munro@enterprisedb.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-03-15T12:49:56Z
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 →
-
Allow page lock to conflict among parallel group members.
- 3ba59ccc896e 13.0 landed
-
Allow relation extension lock to conflict among parallel group members.
- 85f6b49c2c53 13.0 landed
-
Add assert to ensure that page locks don't participate in deadlock cycle.
- 72e78d831ab5 13.0 landed
-
Assert that we don't acquire a heavyweight lock on another object after
- 15ef6ff4b985 13.0 landed
-
Fix unsafe usage of strerror(errno) within ereport().
- 81256cd05f07 11.0 cited
On Sun, Mar 15, 2020 at 4:34 PM Dilip Kumar <dilipbalaut@gmail.com> wrote: > > I have modified 0001 and 0002 slightly, Basically, instead of two > function CheckAndSetLockHeld and CheckAndReSetLockHeld, I have created > a one function. > +CheckAndSetLockHeld(LOCALLOCK *locallock, bool value) Can we rename the parameter as lock_held, acquired or something like that so that it indicates what it intends to do and probably add a comment for that variable atop of function? There is some work left related to testing some parts of the patch and I can do some more review, but it started to look good to me, so I am planning to push this in the coming week (say by Wednesday or so) unless there are some major comments. There are primarily two parts of the patch-series (a) Assert that we don't acquire a heavyweight lock on another object after relation extension lock. (b) Allow relation extension lock to conflict among the parallel group members. On similar lines there are two patches for page locks. I think we have discussed in detail about LWLock approach and it seems that it might be tricky than we initially thought especially with some of the latest findings where we have noticed that there are multiple cases where we can try to re-acquire the relation extension lock and other things which we have discussed. Also, all of us don't agree with that idea. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com