PostgreSQL builtin & contrib

Statistics collector

contrib extensions

The following extensions offer access to Postgres internals which may be of interest or collect additional information. Most of them are shipped with Postgres (the -contrib packages may need to be installed) and can be activated via the extension interface.

pg_stat_statements

pg_stat_statements tracks all queries that are executed on the server and records average runtime per query "class" among other parameters.

pg_stat_plans

pg_stat_plans extends on pg_stat_statements and records query plans for all executed quries. This is very helpful when you're experiencing performance regressions due to inefficient query plans due to changed parameters or table sizes.

pgstattuple

pgstattuple can generate statistics for tables and indexes, showing how much space in each table & index is consumed by live tuples, deleted tuples as well as how much unused space is available in each relation.

pg_buffercache

pg_buffercache gives you introspection into Postgres' shared buffers, showing how many pages of which relations are currently held in the cache.

PostgreSQL Plugins developed in Perl are included in the Core Munin Distribution. The following plugins are included by default: postgres_bgwriter, postgres_locks_, postgres_tuples_, postgres_cache_, postgres_querylength_, postgres_users, postgres_checkpoints, postgres_scans_, postgres_xlog, postgres_connections_, postgres_size_, postgres_connections_db, postgres_transactions_.