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: Kuntal Ghosh <kuntalghosh.2007@gmail.com>, Masahiko Sawada <masahiko.sawada@2ndquadrant.com>,
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 <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-17T11:44:35Z
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
Attachments
- v12-0001-Assert-that-we-don-t-acquire-a-heavyweight-lock-on-a.patch (application/octet-stream) patch v12-0001
- v12-0002-Add-assert-to-ensure-that-page-locks-don-t-participa.patch (application/octet-stream) patch v12-0002
- v12-0003-Allow-relation-extension-lock-to-conflict-among-para.patch (application/octet-stream) patch v12-0003
- v12-0004-Allow-page-lock-to-conflict-among-parallel-group-mem.patch (application/octet-stream) patch v12-0004
On Mon, Mar 16, 2020 at 3:24 PM Dilip Kumar <dilipbalaut@gmail.com> wrote: > + + /* + * Indicate that the lock is released for certain types of locks + */ +#ifdef USE_ASSERT_CHECKING + CheckAndSetLockHeld(locallock, false); +#endif } /* @@ -1618,6 +1666,11 @@ GrantLockLocal(LOCALLOCK *locallock, ResourceOwner owner) locallock->numLockOwners++; if (owner != NULL) ResourceOwnerRememberLock(owner, locallock); + + /* Indicate that the lock is acquired for certain types of locks. */ +#ifdef USE_ASSERT_CHECKING + CheckAndSetLockHeld(locallock, true); +#endif } There is no need to sprinkle USE_ASSERT_CHECKING at so many places, having inside the new function is sufficient. I have changed that, added few more comments and made minor changes. See, what you think about attached? -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com