Itagaki Takahiro wrote: <blockquote cite="mid:20091207094457.950B.52131E4D@oss.ntt.co.jp" type="cite"><pre
wrap="">GregSmith <a class="moz-txt-link-rfc2396E" href="mailto:greg@2ndquadrant.com"><greg@2ndquadrant.com></a>
wrote:
</pre><blockquote type="cite"><pre wrap="">-Not sure if this should be named pg_stat_rest_global (to match the way
these are called "global stats" in the source) or
pg_stat_reset_cluster. Picked the former for V1, not attached to that
decision at all. Might even make sense to use a name that makes it
obvious the pg_stat_bgwriter data is what's targeted. </pre></blockquote><pre wrap="">
A couple of comments:
* We will be able to reset global counters and current database's counters. Do we need to have a method to reset other
databases'counters? Or, will pg_stat_reset_global just reset counters of all databases?
* Is it useful to have a method to reset counters separately? For example, pg_stat_reset( which text ) which :=
'buffers'| 'checkpoints' | 'tables' | 'functions' | ... </pre></blockquote> The fact that you're asking the question
thisway suggests to me I've named this completely wrong. pg_stat_reset_global only resets the bits global to all
databases. It doesn't touch any of the database-specific things that pg_stat_reset can handle right now. At the
moment,the only global information is what's in pg_stat_bgwriter: buffer statistics and checkpoint stats. I'm
thinkingthat I should rename this new function to pg_stat_reset_bgwriter so it's obvious how limited its target is.
Usingeither "global" or "cluster" for the name is just going to leave people thinking it acts across a much larger area
thanit does.<br /><br /><pre class="moz-signature" cols="72">--
Greg Smith 2ndQuadrant Baltimore, MD
PostgreSQL Training, Services and Support
<a class="moz-txt-link-abbreviated" href="mailto:greg@2ndQuadrant.com">greg@2ndQuadrant.com</a> <a
class="moz-txt-link-abbreviated"href="http://www.2ndQuadrant.com">www.2ndQuadrant.com</a>
</pre>