Re: pg_buffercache's usage count

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: pg_buffercache's usage count
Дата
Msg-id 4B84E448.7010908@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: pg_buffercache's usage count  (Ben Chobot <bench@silentmedia.com>)
Ответы Re: pg_buffercache's usage count  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-general
Ben Chobot wrote:
> On Feb 23, 2010, at 3:06 PM, Ben Chobot wrote:
>
>
>> I'm looking at the usage count column of pg_buffercache's info, and I'm confused. Several buffers that supposed have
LRUvalues of 5 belong to non-unique indices which supposedly have never been used. As I understand things, that
shouldn'thappen. Am I missing something? 
>>
>
> (And maybe more to the point, when does the LRU go down in value?)
>

Usage counts only go up when a page is "pinned" because some backend
requested that particular block for its work via a call to BufferAlloc
with the file/block it needs.  Usage counts go down every time the clock
sweep hand looking to allocate new buffers passes over that page during
its constant circular scanning of the buffer cache.  The mechanics
involved are described in a pretty detailed way by the "Inside the
PostgreSQL Buffer Cache" presentation at
http://www.westnet.com/~gsmith/content/postgresql/ (and no where else
I'm aware of, besides the source code itself).

--
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com   www.2ndQuadrant.us


В списке pgsql-general по дате отправления:

Предыдущее
От: Lew
Дата:
Сообщение: Re: typecaste object to array
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: Not able to change the owner of function