Notes on safer database work for AI agents.

Practical writing about disposable Postgres databases, migration validation, SQL checks, and keeping agent experiments away from shared development state.

Latest post

Per-Sandbox Postgres Roles for Coding Agents

Use one login role per disposable Postgres database, keep admin credentials out of task SQL, and understand exactly what the role boundary does and does not isolate.

PostgresMCPdatabase rolesleast privilegecoding agents

Postgres Sandbox Quotas for Coding Agents

Set per-owner Postgres sandbox quotas that contain abandoned agent work without confusing database count, connection limits, TTLs, and cleanup.

How to Use Local Postgres Versions with Coding Agents

Use PGSandbox’s managed local versioned profiles to select specific PostgreSQL majors intentionally, avoid version-mismatch failures, and keep clone/migration validation predictable for coding agents.

How to Use Postgres EXPLAIN Plans for Agent SQL Review

Use Postgres EXPLAIN plans to review agent-generated SQL before execution: create a sandbox, inspect the JSON plan, check row estimates, then run bounded proof only when mutation is intentional.

What Is a Database Sandbox?

A database sandbox is an isolated database environment for testing changes, data states, and agent-generated SQL without mutating production or shared development state.

Database Branching vs Disposable Postgres Sandboxes

Database branching is great for preview environments and team workflows. Disposable Postgres sandboxes are better when a coding agent needs one task-scoped database it can safely prove work inside and throw away.