pg_profile
pg_profile : PostgreSQL load profile repository and report builder
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 6000 | pg_profile | pg_profile | 4.15 |
STAT | BSD-2-Clause | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-- | No | Yes | No | Yes | no | no |
| Relationships | |
|---|---|
| Requires | dblink plpgsql |
| See Also | pg_stat_monitor powa pg_wait_sampling pgsentinel pg_datasentinel pg_stat_statements pg_store_plans pg_stat_plans pg_track_settings pg_track_optimizer |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | MIXED | 4.15 |
18 17 16 15 14 | pg_profile |
dblink, plpgsql |
| RPM | PGDG | 4.15 |
18 17 16 15 14 | pg_profile_$v |
- |
| DEB | PIGSTY | 4.11 |
18 17 16 15 14 | postgresql-$v-pg-profile |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 |
| el8.aarch64 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 |
| el9.x86_64 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 |
| el9.aarch64 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 |
| el10.x86_64 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 |
| el10.aarch64 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 | PGDG 4.15 |
| d12.x86_64 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 |
| d12.aarch64 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 |
| d13.x86_64 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 |
| d13.aarch64 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 |
| u22.x86_64 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 |
| u22.aarch64 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 |
| u24.x86_64 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 |
| u24.aarch64 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 |
| u26.x86_64 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 |
| u26.aarch64 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 | PIGSTY 4.11 |
Source
github.com/zubkov-andrei/pg_profile
pg_profile-4.11.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
pg_profile: historical performance profiling tool for PostgreSQL
pg_profile collects periodic samples of PostgreSQL statistics and generates detailed historical performance reports. It depends on pg_stat_statements and optionally uses pg_stat_kcache and pg_wait_sampling for additional metrics.
Taking Samples
Samples must be taken periodically (e.g., via cron). Each sample captures the current state of statistics:
Generating Reports
Build a report between two sample IDs to analyze performance during that interval:
Managing Servers
pg_profile can collect statistics from remote clusters:
Baselines
Baselines protect sample ranges from automatic cleanup:
Retention
Control how long samples are kept: