Thread

  1. [PATCH] Fix a few outdated SLRU comments

    Julien Rouhaud <julien.rouhaud@free.fr> — 2025-09-05T01:04:58Z

    long_segment_names has been added to SimpleLruInit, and SlruRecentlyUsed is now
    a (static inline) function.
    ---
     src/backend/access/transam/slru.c | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c
    index f78e35d66d5..7ef52a6da0f 100644
    --- a/src/backend/access/transam/slru.c
    +++ b/src/backend/access/transam/slru.c
    @@ -246,6 +246,7 @@ SimpleLruAutotuneBuffers(int divisor, int max)
      * buffer_tranche_id: tranche ID to use for the SLRU's per-buffer LWLocks.
      * bank_tranche_id: tranche ID to use for the bank LWLocks.
      * sync_handler: which set of functions to use to handle sync requests
    + * long_segment_names: use short or long segment names
      */
     void
     SimpleLruInit(SlruCtl ctl, const char *name, int nslots, int nlsns,
    @@ -644,7 +645,7 @@ SimpleLruReadPage_ReadOnly(SlruCtl ctl, int64 pageno, TransactionId xid)
     			shared->page_number[slotno] == pageno &&
     			shared->page_status[slotno] != SLRU_PAGE_READ_IN_PROGRESS)
     		{
    -			/* See comments for SlruRecentlyUsed macro */
    +			/* See comments for SlruRecentlyUsed() */
     			SlruRecentlyUsed(shared, slotno);
     
     			/* update the stats counter of pages found in the SLRU */
    -- 
    2.51.0
    
    
    --CHu9GwQZ59mEyiow--