Re: pg_buffercache's usage count

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: Ben Chobot <bench(at)silentmedia(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_buffercache's usage count
Date: 2010-02-24 14:02:19
Message-ID: 20100224140219.GC3790@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greg Smith wrote:
> 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 LRU values of 5 belong to non-unique indices which supposedly have never been used. As I understand things, that shouldn't happen. 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.

BTW the only reason you don't see buffers having a larger "usage" is
that the counters are capped at that value.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2010-02-24 14:20:06 Re: Row ordering after CREATE TABLE AS...SELECT regexp_split_to_table(source_text, regexp) AS new_column
Previous Message Jeff 2010-02-24 13:44:00 Curious plperl behavior