Re: Fix bank selection logic in SLRU

From: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: Fix bank selection logic in SLRU
Date: 2024-12-10 13:53:50
Message-ID: 837CD79D-E805-4ED5-B4D7-562F64BDE909@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 10 Dec 2024, at 16:26, Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> IIUC, we do check that it should be in multiple of bank size (i.e.)
> which is multiple of 2, right? Am I missing something?

Bank selection code assumes that number of buffers is power of 2.
If the number of buffers is not power of 2 - only subset of buffers will be used. In worst case, e.g. 65 buffers, everything will be buffered only in bank 64.

Best regards, Andrey Borodin.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2024-12-10 13:58:29 Re: Fix bank selection logic in SLRU
Previous Message Pavel Borisov 2024-12-10 13:43:14 Re: [PATCH] Support Int64 GUCs