Re: monitoring-stats.html documentation - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: monitoring-stats.html documentation
Date
Msg-id 200904092232.n39MWYk17954@momjian.us
Whole thread Raw
In response to Re: monitoring-stats.html documentation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.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.

Done.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/monitoring.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/monitoring.sgml,v
retrieving revision 1.66
diff -c -c -r1.66 monitoring.sgml
*** doc/src/sgml/monitoring.sgml    28 Mar 2009 00:10:23 -0000    1.66
--- doc/src/sgml/monitoring.sgml    9 Apr 2009 22:31:00 -0000
***************
*** 924,931 ****

     <note>
      <para>
!      <function>blocks_fetched</function> minus
!      <function>blocks_hit</function> gives the number of kernel
       <function>read()</> calls issued for the table, index, or
       database; but the actual number of physical reads is usually
       lower due to kernel-level buffering.
--- 924,931 ----

     <note>
      <para>
!      <function>pg_stat_get_blocks_fetched</function> minus
!      <function>pg_stat_get_blocks_hit</function> gives the number of kernel
       <function>read()</> calls issued for the table, index, or
       database; but the actual number of physical reads is usually
       lower due to kernel-level buffering.

pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Re: [BUGS] BUG #4027: backslash escapingnotdisabled inplpgsql
Next
From: Josh Berkus
Date:
Subject: Missing mapping in 8.3/tsearch2.sql