Re: Fix bank selection logic in SLRU - Mailing list pgsql-hackers

From Andrey M. Borodin
Subject Re: Fix bank selection logic in SLRU
Date
Msg-id 837CD79D-E805-4ED5-B4D7-562F64BDE909@yandex-team.ru
Whole thread Raw
In response to Re: Fix bank selection logic in SLRU  (Dilip Kumar <dilipbalaut@gmail.com>)
Responses Re: Fix bank selection logic in SLRU
List pgsql-hackers

> On 10 Dec 2024, at 16:26, Dilip Kumar <dilipbalaut@gmail.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,
everythingwill be buffered only in bank 64. 


Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: Pavel Borisov
Date:
Subject: Re: [PATCH] Support Int64 GUCs
Next
From: Dilip Kumar
Date:
Subject: Re: Fix bank selection logic in SLRU