Euler Taveira de Oliveira <eu...@timbira.com> wrote:

> > But there are some confusions in postgres; ReadBufferCount and
> > BufferHitCount are used for "get" and "hit", but "heap_blks_read"
> > and "heap_blks_hit" are used for "read" and "hit" in pg_statio_all_tables.
> I see. :(

I fixed the confusions of get, hit and read in your patch.
    long        num_hit = ReadBufferCount + ReadLocalBufferCount;
    long        num_read = num_hit - BufferHitCount - LocalBufferHitCount;
should be
    long        num_get = ReadBufferCount + ReadLocalBufferCount;
    long        num_hit = BufferHitCount + LocalBufferHitCount;
    long        num_read = num_get - num_hit;

ReadBufferCount means "number of buffer access" :(

Patch attached.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Attachment: buffer_usage_20091001.patch
Description: Binary data

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to