Skip to content

pgtelemetry

SQL monitoring views for database activity, WAL, replication, and storage

Overview

PackageVersionCategoryLicenseLanguage
pgtelemetry1.7STATPostgreSQLSQL
IDExtensionBinLibLoadCreateTrustRelocSchema
6080pgtelemetryNoNoNoYesNoNopgtelemetry

Pure SQL in the fixed pgtelemetry schema; requires pg_stat_statements and plpgsql. Preload pg_stat_statements, not pgtelemetry. Control/SQL are 1.7 while META.json still says 1.6.0; upstream CI stops at PG17, and PG14-18 are verified in PGSTY builds.

Version

TypeRepoVersionPG VerPackageDeps
EXTPIGSTY1.71817161514pgtelemetrypg_stat_statements, plpgsql
RPMPIGSTY1.71817161514pgtelemetry_$vpostgresql$v-contrib
DEBPIGSTY1.71817161514postgresql-$v-pgtelemetry-
OS / PGPG18PG17PG16PG15PG14
el8.x86_64
el8.aarch64
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
el9.x86_64
el9.aarch64
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
el10.x86_64
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
el10.aarch64
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
d12.x86_64
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
d12.aarch64
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
d13.x86_64
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
d13.aarch64
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
u22.x86_64
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
u22.aarch64
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
u24.x86_64
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
u24.aarch64
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
u26.x86_64
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
u26.aarch64
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7
PIGSTY 1.7

Build

You can build the RPM / DEB packages for pgtelemetry using pig build:

pig build pkg pgtelemetry         # build RPM / DEB packages

Install

You can install pgtelemetry directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:

pig repo add pgsql -u          # Add repo and update cache

Install the extension using pig or apt/yum/dnf:

Install
pig install pgtelemetry;          # Install for current active PG version
pig
pig ext install -y pgtelemetry -v 18  # PG 18
pig ext install -y pgtelemetry -v 17  # PG 17
pig ext install -y pgtelemetry -v 16  # PG 16
pig ext install -y pgtelemetry -v 15  # PG 15
pig ext install -y pgtelemetry -v 14  # PG 14
dnf
dnf install -y pgtelemetry_18       # PG 18
dnf install -y pgtelemetry_17       # PG 17
dnf install -y pgtelemetry_16       # PG 16
dnf install -y pgtelemetry_15       # PG 15
dnf install -y pgtelemetry_14       # PG 14
apt
apt install -y postgresql-18-pgtelemetry   # PG 18
apt install -y postgresql-17-pgtelemetry   # PG 17
apt install -y postgresql-16-pgtelemetry   # PG 16
apt install -y postgresql-15-pgtelemetry   # PG 15
apt install -y postgresql-14-pgtelemetry   # PG 14

Create Extension:

CREATE EXTENSION pgtelemetry CASCADE;  -- requires: pg_stat_statements, plpgsql

Usage

Sources:

pgtelemetry version 1.7 is a pure-SQL monitoring bundle. Views and functions summarize relation/database/tablespace size, connections and waits, locks, table access and autovacuum, pg_stat_statements timing and buffers, WAL rate, replication slots, and standby lag.

Example

Preload and install pg_stat_statements first, then install this extension in its fixed pgtelemetry schema:

CREATE EXTENSION pg_stat_statements;
CREATE EXTENSION pgtelemetry;
SELECT * FROM pgtelemetry.database_size;
SELECT * FROM pgtelemetry.connections_by_state;
SELECT * FROM pgtelemetry.longest_running_active_queries LIMIT 10;

Installation is superuser-only. Several objects expose cluster-wide query text, client addresses, sizes, locks, replication state, and other operational metadata; wal_telemetry() also maintains a history table. Grant only the specific views/functions a monitoring role needs, protect exported metrics, set retention for WAL samples, and account for polling cost and PostgreSQL-version changes in statistics catalogs.

Was this page helpful?