system and PostgreSQL state. • Databases, tables, indexes, functions statistics. • Long queries based on pg_stat_activity. • Statatements statistics based on pg_stat_statements. • Tables and indexes sizes. • Replication statistics based on pg_stat_replication.
Usage, Current connection state. • Postgres activity grouped by backends states. • Autovacuum activity: workers, current longest autovacuum. • Statements: per second, average duration, current longest transaction
various stats. • Change sort column and order (desc, asc). • Additional actions for stats. • Change age threshold for long queries. • Cancel queries, Terminate backends.
by default. • Edit configuration file with $EDITOR or use vi by default • Available when pgCenter and PostgreSQL runs on the same host • Edit postgresql.conf, pg_hba.conf, pg_ident.conf, recovery.conf. • Reload PostgreSQL with pg_reload_conf().
Use pg_cancel_query(), pg_terminate_backends() functions. • Cancel or Terminate using backend pid. • Cancel or Terminate group of backends using state mask. • active | idle | idle_in_xact | waiting | others
16... PostgreSQL hosts? • Create connections to other hosts (limited by 8). • Switch between connections. • Close current connection. • Write connection options into ~/.pgcenterrc (or another file). • Open connections with --file=FILENAME option.
high Seq read — index required. • hot_updates = 0 and very high updates — set fillfactor on table. • dead > 0 (with high updates or deletes) — bad autovacuum setup and possible bloat.
age (> hours) — source of tables/indexes bloat. • Idle in transaction state — application code not close transaction, that also cause table/index bloat and may block other transactions. • Waiting state — one query block others, growing response time. • If you see here anything — probably it's bad and cause problems.
Should be installed into your database (see CREATE EXTENSION). • Statements statistics • General stats: calls, calls/s, returned rows, rows/s. • Resource usage stats: CPU time, Read/Write time. • Periodically reset statistics for accurate results, eg. every day.