Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id A21C39FB536 for ; Thu, 3 May 2007 13:35:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 75370-05 for ; Thu, 3 May 2007 13:34:55 -0300 (ADT) X-Greylist: delayed 00:18:00.750036 by SQLgrey-1.7.5 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 50EDF9FB59E for ; Thu, 3 May 2007 13:34:56 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from lynet.oppetid.no (oppetid.no [80.65.51.2]) by svr4.postgresql.org (Postfix) with ESMTP id D90915AF03F for ; Thu, 3 May 2007 16:16:54 +0000 (GMT) Received: by lynet.oppetid.no (Postfix, from userid 1019) id 46F8A11AF0E; Thu, 3 May 2007 18:16:46 +0200 (CEST) Date: Thu, 3 May 2007 18:16:46 +0200 From: Tobias Brox To: Alexander Staubo Cc: Greg Smith , pgsql-performance@postgresql.org Subject: Re: pg_stat_* collection Message-ID: <20070503161646.GA14876@oppetid.no> References: <88daf38c0705030752sa4e38c3h78bcb64a651e6b1a@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <88daf38c0705030752sa4e38c3h78bcb64a651e6b1a@mail.gmail.com> Organization: Group Nordicbet User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/24 X-Sequence-Number: 24414 [Alexander Staubo - Thu at 04:52:55PM +0200] > I have been considering tarring them up as a proper release at some > point. Anyone interested? Yes. Eventually I have my own collection as well: db_activity - counts the number of (all, slow, very slow, stuck "idle in transaction") queries in progress; this is one of the better indicators on how busy/overloaded the database is. (I also have a separate script dumping the contents from pg_stat_activity to a log file, which I frequentlymonitor by "tail -F"). db_commits + db_rollbacks pr database - I'm not sure if those are useful for anything, will eventually remove them. Maybe nice to be able to compare the activity between different databases running on the same host, if they are comparable. db_connections - num of connections compared to max connections. Useful for alarms. db_hanging_transactions - age of oldest transaction. Useful for alarms, since hanging transactions can be very bad for the db performance. db_locks - monitors the number of locks. I've never actually needed this for anything, maybe I should remove it. db_num_backends - number of backends, sorted by databases. Probably not so useful. db_space (one for each database) - monitors space usage, found this script through google. db_xid_wraparound - gives alarms if the databases aren't beeing vacuumed.