Coordinates configuration reviews, incident captures, database changes, benchmarks, and experiments as durable, inspectable operations.
- Asynchronous, resumable execution
- Typed MCP operations for AI agents
- Immutable plans and artifact hashes
Configure servers, audit production, plan and execute reviewed database changes, and validate performance before go-live - with reviewable inputs and portable evidence at every step.
Configure, provision, load, benchmark, diagnose, and compare with one composable toolchain built for DBAs, performance engineers, developers, and AI agents.
01 / THE ECOSYSTEM
Use each utility independently from the command line, or install
the current pg-play release to coordinate all PG
Tools components through recoverable workflows. Each card links
to its source and package while the commands install the latest
available release.
Coordinates configuration reviews, incident captures, database changes, benchmarks, and experiments as durable, inspectable operations.
Converts hardware limits, workload shape, topology, and server version into a reviewable configuration candidate.
Creates disposable but realistic database environments with managed images, bounded resources, logs, and persistent evidence.
Produces realistic plans, logs, locks, and runtime statistics through editable, deterministic workload profiles.
Sweeps concurrency, measures saturation, and keeps the workload, configuration, host, and raw execution evidence together.
Collects database and Linux evidence locally or over SSH, then produces portable reports for humans and automation.
Applies reviewed database operations - versioned SQL change packets, Python steps, operational tasks, and diagnostics - to one or many PostgreSQL 10-18 databases.
02 / THE WORKFLOW
The toolkit preserves the context around every result, so a faster run is evidence - not an anecdote.
Describe the stand, workload, limits, and expected artifacts.
Provision safely, apply a candidate, and execute bounded workloads.
Capture TPS, database state, CPU, memory, disk, network, and logs.
Join only compatible reports and isolate the variable that changed.
Configuration, workload source, generated data, client version, host facts, and collection diagnostics travel with the report. Incompatible experiments are rejected before they distort a chart.
# initialize editable component assets
$ pg-stand init --directory stand
$ pg-workload init --directory workload
# validate and review the complete experiment
$ pg-play validate experiment.yaml
$ pg-play plan experiment.yaml > plan.json
# start the unchanged plan in a durable worker
$ pg-play start experiment.yaml --plan-hash sha256:... --run-id baseline-001
$ pg-play status experiment.yaml --run-id baseline-001
# compare compatible benchmark artifacts
$ pg-play compare-benchmark-reports baseline.json candidate.json
03 / THE ARTIFACT
pg-diag and pg-perf-bench make
structured JSON the durable automation artifact and render
self-contained HTML alongside it.
Collected items keep their columns, types, rows, and collection status. The content checksum verifies that reports use the same diagnostic content set. Workload, configuration, topology, and host identity still have to match before results are compared.
{
"artifact_schema_version": 4,
"generator": { "name": "pg_diag" },
"content": {
"checksum": "sha256:9a846631…fefc7f8e8",
"report_id": "pg_diag_minimal"
},
"items": {
"activity_locks.lock_modes": {
"collection_status": "ok",
"result": {
"kind": "table",
"columns": [
{ "name": "locktype", "pg_type": "text" },
{ "name": "mode", "pg_type": "text" },
{ "name": "granted", "pg_type": "bool" },
{ "name": "locks", "pg_type": "int8", "unit": "count" }
],
"row_count": 4,
"rows": [
["virtualxid", "ExclusiveLock", true, "3"],
["relation", "ShareUpdateExclusiveLock", true, "2"]
]
}
}
}
}
04 / AI-READY
pg-play-mcp exposes supported workflows across the
toolkit as typed MCP operations - no arbitrary shell, SQL, or
Docker access.
High-level operations cover experiment lifecycles, live diagnostics, configuration reviews, converter runs, and artifact comparison. Calls are schema-validated, plans are hashed before execution, and durable runs are resumable.
→ tool call
{
"name": "plan_experiment",
"arguments": { "manifest": "experiments/pg18-candidate.yaml" }
}
← tool result
{
"schema_version": "pg_play/plan-v1",
"experiment_id": "pg18-candidate-03",
"plan_hash": "sha256:4be2…9d01",
"phases": {
"benchmark": true,
"workload_diagnostics": true,
"recreate_workload_database": true
}
}
05 / ENGINEERING PRINCIPLES
Results carry their inputs, environment, versions, raw output, timestamps, and collection status.
Read-only diagnostics, explicit disposable databases, resource guards, and reviewed deployment plans.
Stable CLIs, versioned schemas, structured JSON, portable HTML, and typed MCP operations.
START WITH THE LATEST RELEASE
Available on PyPI · Python · PostgreSQL · Linux
Connect an MCP client ↗