From: | Greg Smith <greg(at)2ndquadrant(dot)com> |
---|---|
To: | Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Clearing global statistics |
Date: | 2009-12-07 00:50:11 |
Message-ID: | 4B1C5143.8090303@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Itagaki Takahiro wrote:
> Greg Smith <greg(at)2ndquadrant(dot)com> wrote:
>
>
>> -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.
>>
>
> 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' | ...
>
The fact that you're asking the question this way 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 thinking that I should rename this new function
to pg_stat_reset_bgwriter so it's obvious how limited its target is.
Using either "global" or "cluster" for the name is just going to leave
people thinking it acts across a much larger area than it does.
--
Greg Smith 2ndQuadrant Baltimore, MD
PostgreSQL Training, Services and Support
greg(at)2ndQuadrant(dot)com www.2ndQuadrant.com
From | Date | Subject | |
---|---|---|---|
Next Message | Itagaki Takahiro | 2009-12-07 01:01:04 | Re: Clearing global statistics |
Previous Message | Itagaki Takahiro | 2009-12-07 00:44:57 | Re: Clearing global statistics |