Re: monitoring-stats.html documentation

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: monitoring-stats.html documentation
Date: 2009-04-05 02:02:34
Message-ID: 603c8f070904041902v262dba8aref387e55e3d2f4ac@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 4, 2009 at 6:08 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> http://developer.postgresql.org/pgdocs/postgres/monitoring-stats.html
>> says: "Note: blocks_fetched minus blocks_hit gives the number of
>> kernel read() calls issued for the table, index, or database; but the
>> actual number of physical reads is usually lower due to kernel-level
>> buffering."  This seems to imply that anything that increases
>> blocks_hit should also increase blocks_fetched, but that doesn't seem
>> to match the actual behavior.
>
>> rhaas=# select heap_blks_read, heap_blks_hit from pg_statio_user_tables;
>
> It's talking about the underlying pg_stat_get_db_blocks_fetched()
> function, not heap_blks_read which is just a view field defined as
>
>            pg_stat_get_blocks_fetched(C.oid) -
>                    pg_stat_get_blocks_hit(C.oid) AS heap_blks_read,
>
> Probably that sentence ought to spell out the full function name
> instead of abbreviating.

Oh, I see. I misread it, but I agree it could be written in a way
that would make it less likely to be misread. You could even add a
sentence explicitly mentioning that the views display the difference
of the two values.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-04-05 02:31:52 Re: ALTER TABLE ... ALTER COLUMN ... SET DISTINCT
Previous Message Tom Lane 2009-04-05 02:00:04 Re: XML only working in UTF-8 - Re: 8.4 open items list