Re: Double partition lock in bufmgr

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Re: Double partition lock in bufmgr
Дата
Msg-id CAD21AoAdB5oU2oTqz8UMpzrAhsf=+wE_YwT5FxjwJDs_dZCyKQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Double partition lock in bufmgr  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Список pgsql-hackers
Hi Konstantin,

On Sat, Dec 19, 2020 at 9:50 PM Konstantin Knizhnik
<k.knizhnik@postgrespro.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/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: doc review for v14
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: row filtering for logical replication