Re: Simple LRU for clog and (later) subtrans - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Simple LRU for clog and (later) subtrans
Date
Msg-id 200306010446.h514kkd08238@candle.pha.pa.us
Whole thread Raw
In response to Simple LRU for clog and (later) subtrans  (Manfred Koizar <mkoi-pg@aon.at>)
List pgsql-patches
(Applying newer version, but posting this because it has a description.)

Your patch has been added to the PostgreSQL unapplied patches list at:

    http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------


Manfred Koizar wrote:
> This patch extracts page buffer pooling and the simple
> 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.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] "Adding missing from clause" (replacement)
Next
From: Tom Lane
Date:
Subject: Re: array support patch phase 1 patch