Skip to content

PG Exporter Blog

PG Exporter articles, design decisions, and release notes.

Read articles for monitoring practice, design records for architecture and tradeoffs, and release notes for changes in each version. Use the manuals to install and operate the current stable release.

PG Exporter Blog
Bounded SQL Scrapes and Client Cancellation DesignReliability
Cluster Progress with Safe Relation Labels DesignPostgreSQLCompatibility
Container Trust Roots and Release Checks DesignSecurityCompatibility
Target Identity and Consistent Health Responses DesignPostgreSQLReliability
Correcting Replication Collector Identity and Semantics DesignPostgreSQLCompatibilityPrometheus
Turning PostgreSQL CSV Logs into Durable Metrics DesignPostgreSQLLoggingPrometheusReliability
Caching pgBackRest Metrics Outside the Scrape Path DesignpgBackRestPrometheusReliability
The PostgreSQL Observability Product We Chose Not to Build DesignProductPostgreSQLObservability
One Endpoint, Several Sources: The Composite Exporter Contract DesignArchitecturePrometheusPgBouncerPatroni
Snapshot Histograms Are Gauges, Not Counters DesignHistogramPrometheusPostgreSQL
Adopting the Victoria observability stack in Pigsty Monitoring
PGCon.Dev 2024: The Week PostgreSQL Commits Paused PostgreSQLPG Ecosystem
PostgreSQL Macro Query Optimization with pg_stat_statements PostgreSQLPG AdminPerformance
Monitor Existing PostgreSQL with Pigsty: RDS, PolarDB, and Self-Hosted Databases PigstyMonitoringRDS
Diagnose PostgreSQL slow queries PostgreSQLPG AdminPerformance
The First Pigsty Release PigstyMonitoring
Golden Monitoring Metrics: Errors, Latency, Throughput, Saturation PostgreSQLPG AdminMonitoring
Introducing Pigsty, a PostgreSQL Monitoring System PigstyMonitoringPostgreSQL
PostgreSQL's KPI PostgreSQLPG AdminMonitoring
An Overview of PostgreSQL Monitoring PostgreSQLMonitoringAdministration
Relation Bloat Monitoring and Management PostgreSQLPG Admin
Monitoring Table Size in PostgreSQL PostgreSQLPG AdminMonitoring
PostgreSQL Server Log Configuration PostgreSQLPG AdminMonitoring

PostgreSQL's KPI

Vonng 1532 words 8 min

PG Load measures accumulated transaction time per second, normalized by a chosen concurrency value. This article derives the metric and shows how to use it for alerting and capacity assessment.

  • Bounded SQL Scrapes and Client Cancellation

    By Vonng In Design 1195 words 6 min

    VonngdesignDesignReliability

    Bounded SQL Scrapes and Client Cancellation

    Status: Shipped in v1.6.0. Decision / last verification: 2026-11-09. Scope: v1.6.0 at source 6bee809 on main, addressing #116. Not shipped in v1.5.0. Delivery: Tag v1.6.0 points to 6bee809; the GitHub Release, versioned archives, RPM/DEB packages, …

    Status: Shipped in v1.6.0. Decision / last verification: 2026-11-09. Scope: v1.6.0 at source 6bee809 on main, addressing #116. Not shipped in v1.5.0. Delivery: Tag v1.6.0 points to 6bee809; the GitHub Release, versioned archives, RPM/DEB packages, …

  • Cluster Progress with Safe Relation Labels

    By Vonng In Design 552 words 3 min

    VonngdesignDesignPostgreSQLCompatibility

    Cluster Progress with Safe Relation Labels

    Status: Shipped in v1.6.0. Decision / last verification: 2026-11-09. Scope: v1.6.0 at source 6bee809 on main, #115; PostgreSQL 12+ vacuum, index creation, and cluster progress. Not shipped in v1.5.0. Delivery: Tag v1.6.0 points to 6bee809; the …

    Status: Shipped in v1.6.0. Decision / last verification: 2026-11-09. Scope: v1.6.0 at source 6bee809 on main, #115; PostgreSQL 12+ vacuum, index creation, and cluster progress. Not shipped in v1.5.0. Delivery: Tag v1.6.0 points to 6bee809; the …

  • Container Trust Roots and Release Checks

    By Vonng In Design 546 words 3 min

    VonngdesignDesignSecurityCompatibility

    Container Trust Roots and Release Checks

    Status: Shipped in v1.6.0. Decision date / last verification: 2026-11-08 / 2026-11-09. Scope: Container and release-validation changes based on v1.5.0 source 1891254, incorporating the packaging correction from 68c95ba. No exporter runtime or driver …

    Status: Shipped in v1.6.0. Decision date / last verification: 2026-11-08 / 2026-11-09. Scope: Container and release-validation changes based on v1.5.0 source 1891254, incorporating the packaging correction from 68c95ba. No exporter runtime or driver …

  • Target Identity and Consistent Health Responses

    By Vonng In Design 1197 words 6 min

    VonngdesignDesignPostgreSQLReliability

    Target Identity and Consistent Health Responses

    Status: Original contract shipped in v1.5.0; the 2026-11-09 health amendment shipped in v1.6.0. Decision / last verification: Original decision 2026-10-23; health amendment and local verification 2026-11-09. Scope: v1.5.0 at source 1891254 (fix …

    Status: Original contract shipped in v1.5.0; the 2026-11-09 health amendment shipped in v1.6.0. Decision / last verification: Original decision 2026-10-23; health amendment and local verification 2026-11-09. Scope: v1.5.0 at source 1891254 (fix …

  • Correcting Replication Collector Identity and Semantics

    By Vonng In Design 1585 words 8 min

    VonngdesignDesignPostgreSQLCompatibilityPrometheus

    Correcting Replication Collector Identity and Semantics

    Status: Shipped in v1.5.0. Decision date / last verified: 2026-10-22 / 2026-10-23. Scope: Collector corrections in pg_exporter main commit d97ba38fc8390984df994b2f9ea58b43ecfc8b89, based on 72f00a4fa4e6eb7524174f2122b3fe1e1d608db4; PostgreSQL …

    Status: Shipped in v1.5.0. Decision date / last verified: 2026-10-22 / 2026-10-23. Scope: Collector corrections in pg_exporter main commit d97ba38fc8390984df994b2f9ea58b43ecfc8b89, based on 72f00a4fa4e6eb7524174f2122b3fe1e1d608db4; PostgreSQL …

  • Turning PostgreSQL CSV Logs into Durable Metrics

    By Vonng In Design 1246 words 6 min

    VonngdesignDesignPostgreSQLLoggingPrometheusReliability

    Turning PostgreSQL CSV Logs into Durable Metrics

    PostgreSQL logs record events that SQL snapshots can miss: deadlocks, authentication failures, canceled autovacuum workers, checkpoints, temporary-file removals, and client disconnects. They can also report statement duration, according to the …

    PostgreSQL logs record events that SQL snapshots can miss: deadlocks, authentication failures, canceled autovacuum workers, checkpoints, temporary-file removals, and client disconnects. They can also report statement duration, according to the …

  • Caching pgBackRest Metrics Outside the Scrape Path

    By Vonng In Design 669 words 4 min

    VonngdesignDesignpgBackRestPrometheusReliability

    Caching pgBackRest Metrics Outside the Scrape Path

    pgbackrest info --output=json reports backup state. The command can contact remote repositories and wait for storage. Running it during a Prometheus request would add that delay to database monitoring. Status: Implemented but unreleased. Decision …

    pgbackrest info --output=json reports backup state. The command can contact remote repositories and wait for storage. Running it during a Prometheus request would add that delay to database monitoring. Status: Implemented but unreleased. Decision …

  • The PostgreSQL Observability Product We Chose Not to Build

    By Vonng In Design 564 words 3 min

    VonngdesignDesignProductPostgreSQLObservability

    The PostgreSQL Observability Product We Chose Not to Build

    We first considered a local PostgreSQL incident workbench. It would read structured logs, reconstruct session timelines, provide interactive filters and a terminal interface, and later run as an agent. Status: Superseded on 2026-08-24 by PostgreSQL …

    We first considered a local PostgreSQL incident workbench. It would read structured logs, reconstruct session timelines, provide interactive filters and a terminal interface, and later run as an agent. Status: Superseded on 2026-08-24 by PostgreSQL …

  • One Endpoint, Several Sources: The Composite Exporter Contract

    By Vonng In Design 803 words 4 min

    VonngdesignDesignArchitecturePrometheusPgBouncerPatroni

    One Endpoint, Several Sources: The Composite Exporter Contract

    Composite mode combines PostgreSQL, PgBouncer, Patroni, pgBackRest, and PostgreSQL log metrics in one /metrics endpoint. It reduces the number of processes and scrape targets for a database node. PostgreSQL remains the primary source; each optional …

    Composite mode combines PostgreSQL, PgBouncer, Patroni, pgBackRest, and PostgreSQL log metrics in one /metrics endpoint. It reduces the number of processes and scrape targets for a database node. PostgreSQL remains the primary source; each optional …

  • Snapshot Histograms Are Gauges, Not Counters

    By Vonng In Design 807 words 4 min

    VonngdesignDesignHistogramPrometheusPostgreSQL

    Snapshot Histograms Are Gauges, Not Counters

    A scalar metric cannot describe the distribution of a changing population. One 30-minute transaction and one hundred 18-second transactions have the same total age, but different counts, maxima, and operational effects. Status: Shipped in v1.4.0. …

    A scalar metric cannot describe the distribution of a changing population. One 30-minute transaction and one hundred 18-second transactions have the same total age, but different counts, maxima, and operational effects. Status: Shipped in v1.4.0. …

  • Adopting the Victoria observability stack in Pigsty

    By Vonng In Article 655 words 2 min

    VonngMonitoring

    Adopting the Victoria observability stack in Pigsty

    This article describes the Pigsty v4 beta in December 2025. While preparing Pigsty v4.0, I replaced the default Prometheus and Loki services with VictoriaMetrics and VictoriaLogs. I also added VictoriaTraces. The aim was to reduce storage and memory …

    This article describes the Pigsty v4 beta in December 2025. While preparing Pigsty v4.0, I replaced the default Prometheus and Loki services with VictoriaMetrics and VictoriaLogs. I also added VictoriaTraces. The aim was to reduce storage and memory …

  • PGCon.Dev 2024: The Week PostgreSQL Commits Paused

    By Vonng In Article 3070 words 15 min

    VonngPostgreSQLPG Ecosystem

    PGCon.Dev 2024: The Week PostgreSQL Commits Paused

    This is a June 2024 conference report. Roles, package counts, and proposals reflect that event. PGCon, the predecessor to PGCon.Dev, was held in Ottawa from 2007 through 2023. It brought PostgreSQL developers together to discuss the project’s …

    This is a June 2024 conference report. Roles, package counts, and proposals reflect that event. PGCon, the predecessor to PGCon.Dev, was held in Ottawa from 2007 through 2023. It brought PostgreSQL developers together to discuss the project’s …

  • PostgreSQL Macro Query Optimization with pg_stat_statements

    By Nikolay Samokhvalov In Article 3926 words 19 min

    Nikolay SamokhvalovPostgreSQLPG AdminPerformance

    PostgreSQL Macro Query Optimization with pg_stat_statements

    This article describes the monitoring approach used in 2023. Its examples use PostgreSQL 15 fields and the dashboards available at that time. Slow queries increase response times and consume database resources. They can also prolong lock contention …

    This article describes the monitoring approach used in 2023. Its examples use PostgreSQL 15 fields and the dashboards available at that time. Slow queries increase response times and consume database resources. They can also prolong lock contention …

  • Monitor Existing PostgreSQL with Pigsty: RDS, PolarDB, and Self-Hosted Databases

    By Vonng In Article 908 words 5 min

    VonngPigstyMonitoringRDS

    Monitor Existing PostgreSQL with Pigsty: RDS, PolarDB, and Self-Hosted Databases

    This tutorial describes Pigsty and Alibaba Cloud services as used in September 2023. Commands, prices, and dashboard details reflect that period. Pigsty is a PostgreSQL distribution. You can also use it solely to monitor PostgreSQL and hosts. This …

    This tutorial describes Pigsty and Alibaba Cloud services as used in September 2023. Commands, prices, and dashboard details reflect that period. Pigsty is a PostgreSQL distribution. You can also use it solely to monitor PostgreSQL and hosts. This …

  • Diagnose PostgreSQL slow queries

    By Vonng In Article 559 words 3 min

    VonngPostgreSQLPG AdminPerformance

    Diagnose PostgreSQL slow queries

    This walkthrough uses the Pigsty sandbox and dashboards from February 2021. Slow queries occupy connections, hold locks, and consume CPU and I/O. On a standby, a long query can conflict with WAL replay. PostgreSQL can delay replay or cancel the …

    This walkthrough uses the Pigsty sandbox and dashboards from February 2021. Slow queries occupy connections, hold locks, and consume CPU and I/O. On a standby, a long query can conflict with WAL replay. PostgreSQL can delay replay or cancel the …

  • The First Pigsty Release

    By Vonng In Article 412 words 2 min

    VonngPigstyMonitoring

    The First Pigsty Release

    This article describes Pigsty at its January 2021 release. Today, I released Pigsty. Official website: pigsty.cc What is Pigsty? Pigsty monitors large PostgreSQL fleets and automates the deployment of highly available clusters. It is free, …

    This article describes Pigsty at its January 2021 release. Today, I released Pigsty. Official website: pigsty.cc What is Pigsty? Pigsty monitors large PostgreSQL fleets and automates the deployment of highly available clusters. It is free, …

  • Golden Monitoring Metrics: Errors, Latency, Throughput, Saturation

    By Vonng In Article 812 words 4 min

    VonngPostgreSQLPG AdminMonitoring

    Golden Monitoring Metrics: Errors, Latency, Throughput, Saturation

    Written in 2020. The metric counts and examples describe the deployment at that time. Preface Operating a database is like driving a car: both require attention to a dashboard. Metrics show the current state and help you decide when to act. Cars …

    Written in 2020. The metric counts and examples describe the deployment at that time. Preface Operating a database is like driving a car: both require attention to a dashboard. Metrics show the current state and help you decide when to act. Cars …

  • Introducing Pigsty, a PostgreSQL Monitoring System

    By Vonng In Article 1666 words 8 min

    VonngPigstyMonitoringPostgreSQL

    Introducing Pigsty, a PostgreSQL Monitoring System

    This article presents Pigsty as it stood in May 2020. Metric counts and dashboard names describe that system. I recently built a database monitoring system called Pigsty. This article describes its architecture, dashboards, and metrics. Pigsty uses …

    This article presents Pigsty as it stood in May 2020. Metric counts and dashboard names describe that system. I recently built a database monitoring system called Pigsty. This article describes its architecture, dashboards, and metrics. Pigsty uses …

  • PostgreSQL's KPI

    By Vonng In Article 1532 words 8 min

    VonngPostgreSQLPG AdminMonitoring

    PostgreSQL's KPI

    Written in 2020. This article develops a load indicator from PgBouncer transaction time. PG Load measures accumulated transaction time per second, divided by a chosen concurrency value. It combines the amount of work a database handles with the time …

    Written in 2020. This article develops a load indicator from PgBouncer transaction time. PG Load measures accumulated transaction time per second, divided by a chosen concurrency value. It combines the amount of work a database handles with the time …

  • An Overview of PostgreSQL Monitoring

    By Vonng In Article 825 words 4 min

    VonngPostgreSQLMonitoringAdministration

    An Overview of PostgreSQL Monitoring

    This article describes a monitoring system from December 2018. Its dashboard layout and statistics-collector details belong to that period. Using monitoring to manage PostgreSQL Managing PostgreSQL requires an understanding of its operating state. …

    This article describes a monitoring system from December 2018. Its dashboard layout and statistics-collector details belong to that period. Using monitoring to manage PostgreSQL Managing PostgreSQL requires an understanding of its operating state. …

  • Relation Bloat Monitoring and Management

    By Vonng In Article 2687 words 13 min

    VonngPostgreSQLPG Admin

    Relation Bloat Monitoring and Management

    This article was written in 2018. It explains statistics-based bloat estimates and maintenance practices from that period. PostgreSQL uses MVCC to let transactions work with different row versions. Old versions can leave tables and indexes larger …

    This article was written in 2018. It explains statistics-based bloat estimates and maintenance practices from that period. PostgreSQL uses MVCC to let transactions work with different row versions. Old versions can leave tables and indexes larger …

  • Monitoring Table Size in PostgreSQL

    By Vonng In Article 954 words 5 min

    VonngPostgreSQLPG AdminMonitoring

    Monitoring Table Size in PostgreSQL

    This 2018 article explains physical storage for ordinary PostgreSQL tables. Table Storage Layout An ordinary table has its own storage and may also have a TOAST table: Main table: stores row data, relkind='r'. TOAST table: stores out-of-line values …

    This 2018 article explains physical storage for ordinary PostgreSQL tables. Table Storage Layout An ordinary table has its own storage and may also have a TOAST table: Main table: stores row data, relkind='r'. TOAST table: stores out-of-line values …

  • PostgreSQL Server Log Configuration

    By Vonng In Article 820 words 4 min

    VonngPostgreSQLPG AdminMonitoring

    PostgreSQL Server Log Configuration

    This article was written in 2018. The table definitions below use the 23-column PostgreSQL 10 CSV format, and the Filebeat example uses the legacy prospectors configuration. CSV logs can be imported into PostgreSQL tables or queried through file_fdw …

    This article was written in 2018. The table definitions below use the 23-column PostgreSQL 10 CSV format, and the Filebeat example uses the legacy prospectors configuration. CSV logs can be imported into PostgreSQL tables or queried through file_fdw …