Real PostgreSQL sandbox
Every scenario runs an actual PostgreSQL instance in a container — not a multiple-choice quiz or a video.
Playground (pgpg) is a REPL-first PostgreSQL incident simulator with 112 hands-on scenarios across 12 production tracks. Start real PostgreSQL failures in Docker, investigate with psql, get hints, submit your fix, and receive deterministic scoring from one interactive terminal session.
No toy editor, no fake database UI, no copying session ids between commands. pgpg opens an interactive REPL: it briefs you on the incident, prints a connection string, and scores your fix — you investigate a real PostgreSQL sandbox with the tools engineers already use.
Start pgpg without arguments to enter the interactive REPL.
pgpg briefs you on the incident and prints a connection string. The prompt tracks the active incident, so the next commands know which session to use.
pgpg creates the incident. You investigate with real PostgreSQL tools.
Scoring is deterministic and offline. AI can assist, but it does not judge the result.
pgpg manages the incident session. psql is where you investigate. The scorecard tells you whether you detected, fixed, and avoided traps.
pgpg is an interactive terminal playground for PostgreSQL incidents. It runs as a REPL-first CLI: it manages the incident session while you investigate the database with psql. Each scenario provisions a real PostgreSQL environment, injects a realistic failure, and scores your fix — Detect, Fix and Trap.
Every scenario runs an actual PostgreSQL instance in a container — not a multiple-choice quiz or a video.
Missing indexes, stale statistics, lock contention, replication lag, disk pressure and WAL growth — injected into a live system.
Get progressive hints while you investigate, a scorecard for your fix and a postmortem explaining the root cause.
Practice alone, onboard new engineers, or run repeatable internal PostgreSQL incident drills.
Run pgpg to open the interactive REPL.
Choose one of 112 PostgreSQL scenarios across 12 tracks.
Use real PostgreSQL tools — EXPLAIN, pg_stat_statements, pg_locks — not a fake browser editor.
Get deterministic Detect / Fix / Trap scoring and a postmortem.
pgpg scores three things on every attempt — and the scoring engine is deterministic and offline, so the same fix always earns the same result.
Inside the REPL, tutor can explain what to check next — it guides and explains, it isn't the source of truth. It never runs your database for you; it helps you learn.
A realistic scenario, the way pgpg presents it — symptoms first, then you investigate and fix.
Checkout latency is 30× higher than normal. Users hit timeouts, CPU isn't maxed, and one query dominates pg_stat_statements.
You open psql with the printed connection string, run EXPLAIN ANALYZE on the hot query and find a sequential scan where an index used to be.
You create the right index without a table rewrite, then submit and score. pgpg scores Detect, Fix and Trap — and explains the root cause.
From slow queries and lock pileups to replication, failover, migrations, security, and final multi-phase Incident Control simulations.
Slow queries, missing indexes, stale statistics, bad plans and sort spills.
Deadlocks, lock queues, idle-in-transaction sessions and DDL that stalls writes.
Connection exhaustion, PgBouncer misconfigurations and pooling failures under load.
Replication lag, WAL growth, replication slot retention and standby conflicts.
Disk pressure, backup validation, PITR and accidental data-loss recovery.
Cross-database workflows, dump/restore between instances and operational drift.
Autovacuum tuning, table and index bloat, and transaction-id wraparound risk.
Failover drills, split-brain risk, synchronous replication and recovery checks.
Migration locks, unsafe backfills and the release patterns that stall production.
Privilege misconfigurations, exposed roles, row-level security gaps and credentials.
Scenarios that combine several failure modes at once — the messy, multi-cause incidents.
Multi-phase production incidents where the goal is to bring the system back under control.
Incident Control is the final pgpg track: multi-phase production incidents where the goal is not just to fix one issue, but to bring a complex PostgreSQL system back under control.
Every incident runs in a local Docker PostgreSQL sandbox controlled by the CLI. No production access is required, generated data is used, and each scenario is a reproducible workflow: provision, seed, inject the fault, run a workload, observe, score and clean up.
Build confidence before your next on-call rotation and prepare for senior backend, SRE and DBA interviews.
Onboard engineers into PostgreSQL operations with repeatable incident drills instead of tribal knowledge.
Run customer trainings with realistic, reproducible incident scenarios you can reuse across clients.
pgpg is a REPL-first local CLI running real PostgreSQL containers in Docker. You run pgpg, start an incident, and investigate with your own psql.
No. It's built for backend engineers, SREs, DevOps engineers and DBAs alike.
No. The scoring engine is deterministic and offline. AI is used for hints and explanation, not as the source of truth.
Yes. Every scenario runs against a real PostgreSQL instance in Docker, not a simulation of one.
No. Scenarios use generated sandbox data, in isolated local environments. No production access is required.
No. pgpg has 112 scenarios across 12 tracks — query performance, locks, replication, WAL, storage, vacuum, bloat, HA, migrations, security and full Incident Control.
No. Every Rillence subscription includes both pgpg and psql+. New scenarios and refinements are included with the subscription.
After practicing incidents in the pgpg REPL, use psql+ as your daily PostgreSQL shell with autocomplete and AI help.
One annual subscription includes both pgpg and psql+.