Search for SLRU page only in its own bank
One of the two slot scans in SlruSelectLRUPage was not walking only the slots in the specific bank where the buffer could be; change it to do that. Oversight in 53c2a97a9266. Author: Sergey Sargsyan <sergey.sargsyan.2001@gmail.com> Discussion: https://postgr.es/m/18582-5f301dd30ba91a38@postgresql.org
This commit is contained in:
parent
2793acecee
commit
7b063ff26a
@ -1184,7 +1184,7 @@ SlruSelectLRUPage(SlruCtl ctl, int64 pageno)
|
||||
Assert(LWLockHeldByMe(SimpleLruGetBankLock(ctl, pageno)));
|
||||
|
||||
/* See if page already has a buffer assigned */
|
||||
for (int slotno = 0; slotno < shared->num_slots; slotno++)
|
||||
for (int slotno = bankstart; slotno < bankend; slotno++)
|
||||
{
|
||||
if (shared->page_status[slotno] != SLRU_PAGE_EMPTY &&
|
||||
shared->page_number[slotno] == pageno)
|
||||
|
Loading…
x
Reference in New Issue
Block a user