pg-regression-radar¶
Detects PostgreSQL query performance regressions and pinpoints which Kubernetes deployment caused them.
{
"name": "argocd-my-app-1234567890-q8675309",
"namespace": "production",
"deployEventId": "argocd-my-app-1234567890",
"queryId": 8675309,
"queryText": "SELECT * FROM orders WHERE user_id = $1",
"status": "Detected",
"confidenceScore": 0.98,
"meanLatencyBefore": 4.2,
"meanLatencyAfter": 13.7,
"latencyChangeFactor": 3.26,
"externalCauseSuspected": false,
"planDiffSummary": "root node changed from Index Scan to Seq Scan",
"createdAt": "2026-08-11T12:35:00Z"
}
What a detection looks like. See the API reference.
The problem¶
Teams running Postgres on Kubernetes (CloudNativePG, Zalando, Crunchy, Percona...) deploy applications many times a day via GitOps (ArgoCD, Flux, Argo Rollouts). When query latency spikes, the first question in every post-mortem is:
Which deploy caused this?
Answered by hand, today
- Open Grafana
- Look at
pg_stat_statements - Try to recall when the last deploy happened
- Cross-reference timestamps by eye
Few tools connect those dots for you.
pg-regression-radar does.
Live detectionWatch a regression get caughtA deploy lands, latency steps up, and the change point is attributed to it.¶
Simulated data. Hover the chart to pause and inspect it, or inject a deploy.
ArchitectureFrom scrape to alertFour components turn pg_stat_statements and deploy webhooks into a single answer.¶
01 Collector
Scrapes pg_stat_statements on an interval and keeps a bounded in-memory time series per queryid.
02 Deploy Event Ingester
Receives webhooks from ArgoCD, Argo Rollouts, and Flux and stores normalised DeployEvent records.
03 Correlation Engine
Runs a real two-stage detection for every deploy event: E-divisive change-point location, then Welch's t-test confirmation.
04 Alerting
Fires a Slack-compatible webhook with the query text, latency before/after, change factor, and confidence score.
Where to go next¶
- Want to see it work first? Open the playground: no install needed.
- New to the project? Start with Installation, then Getting Started.
- Deciding between the two ways to run it? See Architecture Overview.
- Looking for a specific flag or CRD field? See Configuration Reference.
- Want to contribute? See CONTRIBUTING.md in the repo root.
Licensed under Apache 2.0 — see LICENSE.