Re: Elimination of the repetitive code at the SLRU bootstrap functions.
Andrey Borodin <x4mmm@yandex-team.ru>
From: Andrey Borodin <x4mmm@yandex-team.ru>
To: Evgeny Voropaev <evgeny.voropaev@tantorlabs.com>
Cc: Aleksander Alekseev <aleksander@timescale.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>,
alvherre@alvh.no-ip.org
Date: 2025-02-17T12:18:39Z
Lists: 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.