On 2025-Feb-17, Andrey Borodin wrote:

> 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.

Good observation.  This also suggests another change: because this new
function is used not only for bootstrapping but also during WAL replay,
we can call the new function SimpleLruUnloggedZeroPage() and place it
immediately after SimpleLruZeroPage, instead of at the end of the file.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"La persona que no quería pecar / estaba obligada a sentarse
 en duras y empinadas sillas    / desprovistas, por cierto
 de blandos atenuantes"                          (Patricio Vogel)


Reply via email to