From: | Greg Smith <gsmith(at)gregsmith(dot)com> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Add usage counts to pg_buffercache |
Date: | 2007-04-01 03:13:09 |
Message-ID: | Pine.GSO.4.64.0703312259530.3580@westnet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
On Sun, 1 Apr 2007, Russell Smith wrote:
> Currently the max buffer count is 5. But is that a complete safe
> assumption? Maybe a compile time check that BM_MAX_USAGE_COUNT is < 16k
> would ensure that things don't go wrong?
I actually wasn't even aware that was a hard limit; I just assumed that
all my systems just never got over 5 before the LRU hit them. How 'bout
that.
I'm all for paranoia, but the idea of letting LRU usage counts go over 16
bits seems pretty unlikely with the current approach. That would mean
those pages would need 64K passes over the buffer cache before they could
get evicted, which would take quite a while. My bet is that bufferid gets
expanded from 32 bits before that happens, which would break
pg_buffercache similarly and isn't being checked for either.
--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-04-01 03:22:52 | Re: Current enums patch |
Previous Message | Russell Smith | 2007-04-01 02:33:43 | Re: Add usage counts to pg_buffercache |