Other trending packages
There are several other alternates for PostgreSQL monitoring and trending with various benefits and drawbacks.
pgstatspack
A slightly different spin on database monitoring than the rest of the packages listed here, pgstatspack does exactly what last chapter's pg_stat_bgwriter
example did: it just saves periodic snapshots of the PostgreSQL statistics into tables for later analysis. The design was influenced by the very popular statspack utilities for Oracle. The project is hosted at http://pgstatspack.projects.postgresql.org/ and a good introduction to it is at http://www.fuzzy.cz/en/articles/db-tuning-using-pgstatspack/.
The main problem with this approach from my personal perspective fall into three categories:
- Database statistics alone are not sufficient to solve complicated performance issues. You have to collect operating system level information too.
- Aggregating snapshots stored in this fashion into different time scales is a harder problem to solve...