pg_statviz 0.9 released with new features
Happy New Year! I'm excited to announce release 0.9 of pg_statviz, the minimalist extension and utility pair for time series analysis and visualization of PostgreSQL internal statistics.
This is a significant feature release that expands the scope of analysis to include several new modules and a visualization update:
- Configuration changes visualization: A major update providing a timeline view of PostgreSQL setting changes, allowing you to correlate performance shifts with configuration updates.
- Session activity age tracking: The connection module now tracks
oldest_xact_age,oldest_query_age, andoldest_backend_age, helping you quickly identify long-running transactions and idle connections that may be holding resources or preventing vacuum cleanup. - Replication statistics: A new module provides visibility into high-availability setups, tracking standby lag from
pg_stat_replicationand replication slot statistics frompg_stat_replication_slots. - SLRU cache statistics: New metrics for the Simple LRU buffer efficiency allow for better diagnosis of specific internal bottlenecks (like
multixactorpg_xactcontention). - Checksum failure tracking: Added tracking for checksum failures via
pg_stat_databaseto assist in early detection of data corruption issues.
This release also includes important maintenance and optimizations:
- Space optimization:
snapshot_conf()has been optimized to only store configuration changes rather than saving values for every snapshot. The upgrade path automatically compacts existing duplicate configuration rows to reclaim space. - Dependency updates: A GitHub Actions CI pipeline has been added, dependencies have been updated to their latest stable versions, and
arghhas been pinned to <0.30 for CLI argument compatibility.
pg_statviz takes the view that everything should be light and minimal. Unlike commercial observability platforms, it doesn't require invasive agents or open connections to the database — it all lives inside your database.
The extension is plain SQL and PL/pgSQL and doesn't require modules to be loaded, the visualization utility is separate and can be run from anywhere, and your data is free and easy to export.
- You can download and install
pg_statvizfrom the PostgreSQL repositories or PGXN. - The utility can also be installed from PyPi.
- Manual installation is also possible.
/ blog