PGMon

Monitoring a database usage is a very important part of application lifecycle and tuning - PostgreSQL already provides pg_stats view (and other pg_stat_* views), but this does not provide any information about history and without such context it's not possible to detect suspicious patterns (for example leap increase of number of dead tuples), etc. This project aims to provide a tool to gather, display and analyze such historical data.

This project is hosted on sourceforge.net, on http://pgmonitor.sf.net (or more precisely at http://apps.sourceforge.net/trac/pgmonitor/).

Sometimes the application suddenly goes crazy - the database is crawling like a snail, the drives are used on 100% while the CPU is bumming idle at 1% (or vice versa), and so on. And in a short while everything works fine again ...

What caused the problem? Was there a serious increase in number of queries regarding some of the large tables, or did some of the PostgreSQL configuration parameters change? Was there a lot of "dead tuples" in one of the tables? Have some of the queries used "seqscan" instead of the usual "indexscan"? What went wrong?

PostgreSQL contains some very interesting views (pg_stats and other pg_stat_*) but the questions mentioned above may not be answered without information about previous values - but those values are not contained in these views. And that's why this project was funded - it's goal is to archive data from the interesting views and display them in a useful way.

Articles about the project