pg_exporter v1.4.0
Snapshot histograms, pg_xact_age collector, HTTP hardening
Categories:
v1.4.0 introduces the Snapshot Histogram metric type and the new pg_xact_age transaction age collector, along with a round of systematic hardening across HTTP routing, packaging, and the build toolchain.
New Features
- New
HISTOGRAMcolumn type: SQL query snapshots can be aggregated per label group into classic Prometheus histograms, deriving_bucket/_count/_sumseries families; bucket bounds are strictly validated at config load time (finite, strictly increasing,+Infappended automatically),lebecomes a reserved label, and hot reload is fully supported - New
pg_xact_agecollector: exposes the distribution of open transaction age (pg_xact_age_seconds) and idle-in-transaction age (pg_xact_age_idle_seconds) as histograms; cluster-level collection, client backends only, 10s TTL - Default config bundle grows from 57 to 58 definition files;
pg_xact_agetakes slot0450, withpg_lock/pg_lock_stat/pg_queryrenumbered to0460/0470/0480(contents unchanged)
Fixes & Improvements
- HTTP route registration is isolated to a private ServeMux instead of the global
DefaultServeMux, so endpoints registered by third-party libraries can no longer be exposed accidentally --web.telemetry-pathis strictly validated at startup: empty paths, paths not starting with/, paths containing?#{}, conflicts with built-in endpoints, and non-canonical paths like//metricsthat could never be matched all fail fast with a clear error- The landing page HTML-escapes the telemetry path
- The primary connection pool is properly closed when
--fail-fastpre-check fails - RPM / DEB packaging fixes (#105): the
prometheussystem user’s HOME now points to/var/lib/prometheus(where libpq looks for~/.pgpass), and the packaged default URL gains the/postgresdatabase name so libpq no longer falls back to a database named after the OS user - Version string unified with the
vprefix:--versionoutput, the/versionendpoint, and thepg_exporter_build_info{version=...}label of official release binaries now reportv1.4.0(GoReleaser artifacts previously reported unprefixed1.3.0); artifact file names, package versions, and Docker image tag conventions are unchanged - Histogram value casting aligned with the scalar path: timestamp and boolean columns are exempt from
scale - GoReleaser embedded package metadata corrected: supported range updated to PostgreSQL
9.x - 19+and pgBouncer1.8 - 1.25+ make dockerrestoresGOPROXY/GOSUMDBbuild-arg passthrough
Engineering & Build
- Build toolchain updated to Go
1.26.5, exporter-toolkitv0.17.1, and prometheus/commonv0.70.0 - New regular CI verification workflow: module tidy check, generated-config drift check (
make confoutput must stay in sync withconfig/*.yml), race tests, and six-platform cross-builds - Docker build tooling consolidated: the
docker/scripts andmake docker-releaseare removed; multi-arch release images are built by GoReleaser - Config coverage tests generalized: tests no longer assume specific collectors exist in the config directory, making trimmed custom bundles easier to maintain
Upgrade Notes
- If you were running with a non-canonical telemetry path (e.g.
//metrics), the process will now refuse to start — previously it started but the metrics endpoint was silently unreachable - Automation that parses the
versionlabel ofpg_exporter_build_infoor the--versionoutput needs to accommodate thevprefix - When any
HISTOGRAMcollector is configured,lecan no longer be used as a constant label
Checksums
https://github.com/pgsty/pg_exporter/releases/download/v1.4.0/checksums.txt
9874191591567ede87ae1d5820f06e781f27c664a7f4a6365211f9e042fd8199 checksums.txt
c6af4ae62e13f518539a6d0b3ce86ff9f7acdb567a4f0f86c6f47563574da724 pg-exporter_1.4.0-1_amd64.deb
ff0360f61982ed627d1b1f93281a0ba66da9d077672f0c214e19522df01e40d6 pg-exporter_1.4.0-1_arm64.deb
4fbadd4e9d918c9bc8e63975378e49375b0ff897d6b8a0f78799538b13dd68a1 pg-exporter_1.4.0-1_ppc64le.deb
5ce106d27fffa77c39fea9bf7cbc60f4328df3d926fef025bfdd082eb6d743fd pg_exporter-1.4.0-1.aarch64.rpm
870b434e802e0039f10e1e3583c28a1fd83db4363a4608e1fab7f375f6d30600 pg_exporter-1.4.0-1.ppc64le.rpm
c550d16ce3f9276948a4d44174e11716fc5e85e31e8788ea106a57cfbabd8488 pg_exporter-1.4.0-1.x86_64.rpm
11a34e531ac5d6d378b91e768f575525389141a6860afabd0cc9f2d853f06749 pg_exporter-1.4.0.darwin-amd64.tar.gz
49d8d3a5932602f433c4ef681ed12007da1cbc11b5ee0f9d7b4dc2d0dff8e26e pg_exporter-1.4.0.darwin-arm64.tar.gz
113dfe70d4f780a456c05ca6b731f96c1013bf35ecb87d75c443fe2bac7e333b pg_exporter-1.4.0.linux-amd64.tar.gz
68b4630ab39943658a8aff135990896a5ccf56c8a992e5982d572c78ef822e18 pg_exporter-1.4.0.linux-arm64.tar.gz
72710625e5658c941b48f7becba9a86491852cea5469240328292838d9ed0979 pg_exporter-1.4.0.linux-ppc64le.tar.gz
14a0cf6ffa04c7e54c1d5aa5b37fe4bea1429c1d1e7cce89e9dd805c4a29db0b pg_exporter-1.4.0.windows-amd64.tar.gz