Microsoft has open-sourced pg_durable, a Postgres extension that runs durable workflows entirely inside the database. A pg_durable function is a graph of SQL steps the server executes and checkpoints as it runs. If the database crashes, restarts, or a step fails, execution resumes from the last checkpoint rather than leaving you to reconstruct state by hand.
The point worth grasping is where the work happens: nowhere else. Built with pgrx, the extension registers a background worker and sits on two Rust libraries, duroxide for deterministic replay, checkpoints and timers, and duroxide-pg for Postgres-backed state. There is no separate queue, no external orchestrator, no second service to keep alive.
The use cases land squarely in agent and AI plumbing: chunk text, call an embedding API and upsert into pgvector; stage, dedupe and publish large batches; or run enrichment and webhook-style calls straight from SQL, including a step that waits for human approval before continuing. It competes with the growing "just use Postgres" durable-execution crowd, but with Microsoft's name and an in-database design. It is still in preview, so the question is how it holds up on long-running steps under real load.