pg_profile
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_profile | 4.15 | STAT | BSD-2-Clause | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 6000 | pg_profile | No | Yes | No | Yes | No | No | - |
| Related | dblink plpgsql 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 |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | MIXED | 4.15 | 1817161514 | pg_profile | dblink, plpgsql |
| RPM | PGDG | 4.15 | 1817161514 | pg_profile_$v | - |
| DEB | PIGSTY | 4.11 | 1817161514 | postgresql-$v-pg-profile | - |
Build
You can build the DEB packages for pg_profile using pig build:
Install
You can install pg_profile directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
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:
Sample Information
Recommended Settings
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)