Skip to content

Commit 2b88fdd

Browse files
committed
Track SLRU page hits in SimpleLruReadPage_ReadOnly
SLRU page hits were tracked only in SimpleLruReadPage, but that's not enough because we may hit the page in SimpleLruReadPage_ReadOnly in which case we don't call SimpleLruReadPage at all. Reported-by: Kuntal Ghosh Discussion: https://postgr.es/m/20200119143707.gyinppnigokesjok@development
1 parent 91c4054 commit 2b88fdd

File tree

1 file changed

+4
-0
lines changed
  • src/backend/access/transam

1 file changed

+4
-0
lines changed

src/backend/access/transam/slru.c

+4
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,10 @@ SimpleLruReadPage_ReadOnly(SlruCtl ctl, int pageno, TransactionId xid)
491491
{
492492
/* See comments for SlruRecentlyUsed macro */
493493
SlruRecentlyUsed(shared, slotno);
494+
495+
/* update the stats counter of pages found in the SLRU */
496+
pgstat_count_slru_page_hit(ctl);
497+
494498
return slotno;
495499
}
496500
}

0 commit comments

Comments
 (0)