Simple LRU for clog and (later) subtrans

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: pgsql-patches(at)postgresql(dot)org
Subject: Simple LRU for clog and (later) subtrans
Date: 2003-05-02 10:01:34
Message-ID: ble4bvkpbi3ouj9vog8tnd3f8gajfoqi9q@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

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.

Servus
Manfred

Attachment Content-Type Size
unknown_filename text/plain 60.6 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-05-02 19:48:26 Re: GUC patch for Win32
Previous Message Bruce Momjian 2003-05-02 04:23:35 Re: GUC patch for Win32