What is PMP4PG?
PMP4PG (Proactive Monitoring Platform for PostgreSQL) is an open monitoring platform designed to give database administrators, DevOps engineers and developers deep, actionable visibility into their PostgreSQL infrastructure.
PMP4PG is directly inspired by Oracle Enterprise Manager (OEM) and Oracle AWR (Automatic Workload Repository) — bringing the same level of analytical depth that Oracle DBAs rely on daily, natively to the PostgreSQL ecosystem.
The Problem It Solves
PostgreSQL is a powerful, production-grade database engine. Yet when it comes to workload analysis and proactive performance monitoring, it lacks the built-in tooling that Oracle shops have had for decades.
Standard PostgreSQL monitoring tools typically offer:
- Basic metrics collection (CPU, connections, query counts)
- Real-time dashboards with limited historical depth
- No workload report generation between arbitrary time intervals
PMP4PG fills that gap by introducing:
- An Active Session History (ASH) mechanism — sampling
pg_stat_activityevery 2 seconds - AWR-style periodic snapshots — aggregating metrics into history tables every 30 minutes
- Proactive workload reports — comparing any two snapshots to identify regressions
- Long-term trend analysis — tracking how your instances evolve over weeks and months
Core Concepts
Active Session History (ASH)
Every 2 seconds, the PMP4PG agent captures the state of all active PostgreSQL sessions from pg_stat_activity. These samples are stored as-is in the platform repository, enabling near-real-time analysis of what your database is doing at any given moment.
AWR Snapshots
Every 30 minutes, the PMP4PG backend automatically creates a snapshot — an aggregated, numbered checkpoint of key PostgreSQL statistics (pg_stat_statements deltas, pg_stat_database deltas, WAL stats, OS metrics...). These snapshots are the foundation for AWR-style reports.
AWR Reports
By selecting two snapshots (a begin and an end), you generate a detailed workload report covering load profile, top SQL by various dimensions, wait events, lock contention, vacuum activity and more. Reports can be exported as standalone HTML files for sharing and archiving.
Trends
The *_history tables store aggregated metrics over time, enabling you to chart the evolution of key indicators — database size, throughput, WAL generation — over days, weeks or months.
What PMP4PG Is Not
- It is not a query execution planner or query rewriter
- It is not a backup and recovery tool
- It is not a replication manager
- It is not a replacement for
pg_activityorpgBadger— it complements them with a different analytical approach
Relationship to Oracle OEM / AWR
| Oracle Concept | PMP4PG Equivalent |
|---|---|
V$SESSION | pg_stat_activity (sampled every 2s) |
V$ACTIVE_SESSION_HISTORY | ASH samples table (live data) |
DBA_HIST_ACTIVE_SESS_HISTORY | History tables (snapshots every 30 min) |
| AWR Snapshot | PMP4PG AWR Snapshot |
| AWR Report | PMP4PG AWR Report (HTML export) |
| OEM Dashboard | PMP4PG Global Dashboard |
Next Steps
- Explore the Key Features →
- Understand the Architecture →
- See Who PMP4PG is for →