Re: Fix bank selection logic in SLRU

x4mmm@yandex-team.ru

From: "Andrey M. Borodin" <x4mmm@yandex-team.ru>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Yura Sokolov <y.sokolov@postgrespro.ru>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2024-12-10T14:17:55Z
Lists: pgsql-hackers

> On 10 Dec 2024, at 16:58, Dilip Kumar <dilipbalaut@gmail.com> wrote:
> 
> slru buffers are in multiple of 16(bank size)

Yes, my example with 64 buffers is incorrect.
The worst case scenario is when user configures 80, 144, 528 or 1040 buffers, but only two banks (32 buffers) will be used.


Best regards, Andrey Borodin.


Commits

  1. Fix SLRU bank selection code