From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
Cc: | Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager |
Date: | 2020-03-13 10:09:42 |
Message-ID: | CAA4eK1Kp_zrOSMFHM1Oxbc3u9fXxU=qR3g0oLAj1YVLves7gng@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Mar 13, 2020 at 8:37 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> On Thu, Mar 12, 2020 at 5:28 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Thu, Mar 12, 2020 at 11:15 AM Dilip Kumar <dilipbalaut(at)gmail(dot)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.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
0002-Allow-relation-extension-and-page-locks-to-conflict-.v2.patch | application/octet-stream | 8.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2020-03-13 10:11:56 | Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager |
Previous Message | Darafei Komяpa Praliaskouski | 2020-03-13 09:05:58 | Re: Berserk Autovacuum (let's save next Mandrill) |