Re: Simple LRU for clog and (later) subtrans

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Manfred Koizar <mkoi-pg(at)aon(dot)at>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Simple LRU for clog and (later) subtrans
Date: 2003-06-01 04:46:46
Message-ID: 200306010446.h514kkd08238@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Manfred Spraul 2003-06-01 09:10:46 Re: ECPG thread-safety
Previous Message Bruce Momjian 2003-06-01 04:45:19 Re: "Adding missing from clause"