Guides
Each guide answers one job. New to the tool? Read your first check first, then come here by what you need to do.
I'm on call and something is wrong
- Slow-query triage on production — From 'the app is slow' to a ranked, explainable fix list in one read-only run.
- Onboarding onto a legacy schema — First week with an inherited database: the audit that finds what nobody documented.
I run databases for a team
Pick the runner that matches the job — all three read connection profiles from pgdba-run.toml, so zero-flag runs work everywhere:
| Job | Runner | Guide |
|---|---|---|
| One database, on a schedule or as a CI gate | cron or systemd running pgdba check |
Recurring checks |
| Many databases at once, one aggregate report | pgdba fleet check |
Run a fleet |
| Always-on advisor with a local JSON API | pgdba serve |
Run as a service |
- Connection profiles (pgdba-run.toml) — Named connection profiles, zero-flag runs, pooler-aware safety contracts.
- Recurring checks (cron) — Schedule pgdba with cron or systemd, gate on exit codes, and alert via webhook.
- Run a fleet — Check many databases with one command and read one aggregate report.
- Run the advisor as a service — Always-on checks per target with a read-only JSON API.
I need to change something
- Fix a finding — From finding to reviewed, reversible change: review, plan, apply, revert.
- Migrate: the safe lane — Dry-run first, review the report, then migrate — preflight gates, confirm, verify.
- Rehearse a restore — Prove your backups are restorable, and measure restore throughput against an RTO.
- Pre-upgrade assessment — Know what a PG minor/major upgrade or extension bump will break — before it does.
I extend or automate
- Agent-driven maintenance — Let an LLM agent read the JSON report and act through the gated apply path.
- Write a check plugin — Extend pgdba with third-party checks — no fork, same safety contract.