Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager
Dilip Kumar <dilipbalaut@gmail.com>
From: Dilip Kumar <dilipbalaut@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Masahiko Sawada <masahiko.sawada@2ndquadrant.com>,
Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.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-13T13:32:40Z
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 Fri, Mar 13, 2020 at 3:39 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Fri, Mar 13, 2020 at 8:37 AM Dilip Kumar <dilipbalaut@gmail.com> wrote: > > > > On Thu, Mar 12, 2020 at 5:28 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > > > > On Thu, Mar 12, 2020 at 11:15 AM Dilip Kumar <dilipbalaut@gmail.com> wrote: > > > > > > > > I have fixed this in the attached patch set. > > > > > > > > > > I have modified your > > > v4-0003-Conflict-Extension-Page-lock-in-group-member patch. The > > > modifications are (a) Change src/backend/storage/lmgr/README to > > > reflect new behaviour, (b) Introduce a new macro LOCK_LOCKTAG which > > > slightly simplifies the code, (c) moved the deadlock.c check a few > > > lines up and (d) changed a few comments. > > > > Changes look fine to me. > > > > Today, while looking at this patch again, I realized that there is a > where we sometimes allow group members to jump the wait queue. This > is primarily to avoid creating deadlocks (see ProcSleep). Now, > ideally, we don't need this for relation extension or page locks as > those can never lead to deadlocks. However, the current code will > give group members more priority to acquire relation extension or page > locks if any one of the members has held those locks. Now, if we want > we can prevent giving group members priority for these locks, but I am > not sure how important is that case. So, I have left that as it is by > adding a few comments. What do you think? > > Additionally, I have changed/added a few more sentences in README. I have included all your changes in the latest patch set. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com