Skip site navigation (1) Skip section navigation (2)

Resetting cluster-wide statistics

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Resetting cluster-wide statistics
Date: 2009-03-23 23:15:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
There are a few statistics that are only kept on a per-cluster basis, such 
as those reported in pg_stat_database and pg_stat_bgwriter.  Since 
pg_stat_reset only resets per-database counts, it doesn't touch those.

I'd like to have a function that resets those.  Maybe iterates over all 
the databases while it's at it and clear the whole mess out as another 
option.  I'm curious why something resetting the cluster-wide stats isn't 
available already.  Just because nobody bothered to write it before, or is 
there some reason why this can't work that I just didn't notice during my 
brief scan of pgstat.c?

* Greg Smith gsmith(at)gregsmith(dot)com Baltimore, MD


pgsql-hackers by date

Next:From: Tom LaneDate: 2009-03-23 23:38:34
Subject: Re: GIN fast-insert vs autovacuum scheduling
Previous:From: Tom LaneDate: 2009-03-23 23:10:32
Subject: Re: contrib function naming, and upgrade issues

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group