Playground (pgpg)
What pgpg is
pgpg is a local PostgreSQL incident simulator. Each scenario drops you into a realistic database failure — a runaway query, a corrupted index, a misfired migration — and challenges you to diagnose and repair it against a real PostgreSQL instance running in Docker.
It's built for engineers who want to get sharper at operating Postgres under pressure: backend developers, SREs, DBAs, and anyone on call who'd rather practice on a disposable sandbox than learn during a real outage.
The core loop
Every scenario follows the same rhythm:
- Start a scenario to spin up a fresh, broken database.
- Investigate in real
psql— read the symptoms, form a hypothesis. - Apply a fix the way you would in production.
- Run
scorefor a deterministic, offline Detect / Fix / Trap grade. - Read the postmortem to learn what actually went wrong and why.
Stuck along the way? Hints are there when you want them, and reset lets you retry as often as you like.
What's inside
There are 112 scenarios across 12 tracks, building from common operational mishaps to subtle, hard-to-spot failures. Everything runs local-first with deterministic scoring, so your results are consistent and reproducible — no luck, no guessing what the grader wants.