Re: Elimination of the repetitive code at the SLRU bootstrap functions.

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Re: Elimination of the repetitive code at the SLRU bootstrap functions.
Дата
Msg-id BA4E87E0-8120-413F-A36D-71C5DB217ADD@yandex-team.ru
обсуждение исходный текст
Ответ на Re: Elimination of the repetitive code at the SLRU bootstrap functions.  (Aleksander Alekseev <aleksander@timescale.com>)
Ответы Re: Elimination of the repetitive code at the SLRU bootstrap functions.
Список pgsql-hackers

> On 14 Feb 2025, at 11:54, Evgeny Voropaev <evgeny.voropaev@tantorlabs.com> wrote:
>
> <v2-0001-Elimination-of-the-repetitive-code-at-the-SLRU-bo.patch>

Hi! Nice patch!

BootStrapSlruPage() always calls zerofunc(pageno, false) with second argument false.
In case of every possible argument (ZeroCLOGPage, ZeroCommitTsPage, ZeroMultiXactOffsetPage, ZeroMultiXactMemberPage,
ZeroSUBTRANSPage)it means just a call to SimpleLruZeroPage(). 
I think we can safely replace

+ slotno = (*zerofunc)(pageno, false);

with

+ slotno = SimpleLruZeroPage(pageno);

Thus we will not need zerofunc argument at all.

Thanks!


Best regards, Andrey Borodin.


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