New pgSCV 0.7.0 has been released, with new features, bug fixes and minor improvements.

Basic authentication and TLS support. When pgSCV have to be installed in public or untrusted networks, it can be protected with TLS and basic authentication. Basic auth restricts access and TLS encrypts communication. It is strongly recommended to use both and TLS and basic auth — without using TLS, auth credentials could be easily intercepted. Checkout the wiki for configuration details.

Patroni support. Patroni is the widely used tool for Postgres high availability and often used in Postgres infrastructure. Added auto-discovery for local Patroni services with collecting metrics when it is found. But, few days ago, new version of Patroni has been released with built-in metrics. Hmm… ok, I’m going to keep Patroni metrics on pgSCV, also added compatibility and keep some metrics which are not present in Patroni about time of latest timeline change.

Refactor the collecting of Postgres metadata. You might be know that different version of Postgres have different stats features (view and functions), and for collecting metrics, pgSCV have to know extra details about Postgres. For example, Postgres version, installed pg_stat_statements (database and schema), status of recovery, data block size, and etc. Earlier versions of pgSCV are collect metadata at startup. This approach has a downside — this state of Postgres might change — version might be upgraded, pg_stat_statements reconfigured, block size recompiled, recovery enabled and so on. Hence, pgCSV has to always have fresh metadata. New pgSCV version updates metadata at every metrics collecting. This adds some tiny overhead (a few SQL queries), which is negligible in fact.

Remove an internal query normalization. This normalization was used to overcome drawbacks of pg_stat_statements’ native normalization. But using this extra normalization adds some complexity — queries normalized by pgSCV become are not the same as in pg_stat_statements. This might confuse. In new version, normalization has been removed. This allow to keep queries text the same as in the pg_stat_statements and allow use the native queryid of pg_stat_statements for identification. Unfortunately this change is break compatibility — labels of statements metrics have been changed, label ‘md5’ was replaced with ‘queryid’. If you use pgSCV grafana dashboards, download new, updated revision.

Added architecture decision records (ADR). This is not related to functionality, these ADRs briefly describes about architectural choices. ADRs are used to remember and not forget about accepted or rejected decisions.

Fixed the bug when using of environment variables prevents starting of services auto-discovery.

Fixed the bug when collecting of metrics stopped when some of monitored filesystems hangs and doesn’t respond.

That is all, I hope you found these useful.

PostgreSQL DBA