Re: slru bank - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: slru bank
Date
Msg-id CAKFQuwYJn=8meANPso9FqTc+Wv=at9suxi25wtrxX1gnJkM4MA@mail.gmail.com
Whole thread Raw
In response to slru bank  ("席冲(宜穆)" <xichong.xc@alibaba-inc.com>)
Responses Re: slru bank
List pgsql-hackers
On Thu, Aug 22, 2024 at 7:07 PM 席冲(宜穆) <xichong.xc@alibaba-inc.com> wrote:

In SlruSelectLRUPage(),  Why do we need to traverse all slots to find that a page already has a buffer assigned? Why not find it 

from the [bankstart,bankend]?


Only the bank is searched, both of the logic loops are bounded by:

for (int slotno = bankstart; slotno < bankend; slotno++)

David J.

pgsql-hackers by date:

Previous
From: "席冲(宜穆)"
Date:
Subject: slru bank
Next
From: Tom Lane
Date:
Subject: Re: slru bank