From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru> |
Cc: | Zhihong Yu <zyu(at)yugabyte(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Double partition lock in bufmgr |
Date: | 2020-12-29 07:59:17 |
Message-ID: | CAD21AoAdB5oU2oTqz8UMpzrAhsf=+wE_YwT5FxjwJDs_dZCyKQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Konstantin,
On Sat, Dec 19, 2020 at 9:50 PM Konstantin Knizhnik
<k(dot)knizhnik(at)postgrespro(dot)ru> wrote:
>
>
>
> On 19.12.2020 10:53, Zhihong Yu wrote:
> > Hi,
> > w.r.t. the code in BufferAlloc(), the pointers are compared.
> >
> > Should we instead compare the tranche Id of the two LWLock ?
> >
> > Cheers
>
> As far as LWlocks are stored in the array, comparing indexes in this
> array (tranche Id) is equivalent to comparing element's pointers.
> So I do not see any problem here.
>
> Just as experiment I tried a version of BufferAlloc without double
> locking (patch is attached).
> I am not absolutely sure that my patch is correct: my main intention was
> to estimate influence of this buffer reassignment on performance.
> I just run standard pgbench for database with scale 100 and default
> shared buffers size (256Mb). So there are should be a lot of page
> replacements.
> I do not see any noticeable difference:
>
> vanilla: 13087.596845
> patch: 13184.442130
>
You sent in your patch, bufmgr.patch to pgsql-hackers on Dec 19, but
you did not post it to the next CommitFest[1]. If this was
intentional, then you need to take no action. However, if you want
your patch to be reviewed as part of the upcoming CommitFest, then you
need to add it yourself before 2021-01-01 AoE[2]. Thanks for your
contributions.
Regards,
[1] https://commitfest.postgresql.org/31/
[2] https://en.wikipedia.org/wiki/Anywhere_on_Earth
--
Masahiko Sawada
EnterpriseDB: https://www.enterprisedb.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2020-12-29 08:08:11 | Re: row filtering for logical replication |
Previous Message | Michael Paquier | 2020-12-29 07:57:42 | Re: doc review for v14 |