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

Lines changed: 4 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy