Re: pg_stat_* collection

From: Tobias Brox <tobias(at)nordicbet(dot)com>
To: Alexander Staubo <alex(at)purefiction(dot)net>
Cc: Greg Smith <gsmith(at)gregsmith(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: pg_stat_* collection
Date: 2007-05-03 16:16:46
Message-ID: 20070503161646.GA14876@oppetid.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

[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.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Davis 2007-05-03 18:21:30 Re: pg_stat_* collection
Previous Message Leif B. Kristensen 2007-05-03 15:18:50 Re: Feature request - have postgresql log warning when new sub-release comes out.