• Bruce Momjian's avatar
    This patch extracts page buffer pooling and the simple · 0abe7431
    Bruce Momjian authored
    least-recently-used strategy from clog.c into slru.c.  It doesn't
    change any visible behaviour and passes all regression tests plus a
    TruncateCLOG test done manually.
    
    Apart from refactoring I made a little change to SlruRecentlyUsed,
    formerly ClogRecentlyUsed:  It now skips incrementing lru_counts, if
    slotno is already the LRU slot, thus saving a few CPU cycles.  To make
    this work, lru_counts are initialised to 1 in SimpleLruInit.
    
    SimpleLru will be used by pg_subtrans (part of the nested transactions
    project), so the main purpose of this patch is to avoid future code
    duplication.
    
    Manfred Koizar
    0abe7431
slru.h 1.78 KB