Microsoft Open-Sources PostgreSQL Extension for In-Database Durable Execution
Summary
Microsoft has open-sourced "pg_durable", a PostgreSQL extension designed to enable durable workflows to run natively within the database, thereby eliminating the need for external orchestration systems. Released on June 10, 2026, "pg_durable" allows developers to define fault-tolerant, long-running SQL functions directly in SQL, managing execution concerns like retries, fan-out, and recovery internally. The extension persists function execution state in PostgreSQL tables, ensuring workflows survive crashes, restarts, and failovers by resuming from the last durable checkpoint. It exposes a Domain Specific Language (DSL) with primitives for scheduling, conditions, and parallel execution, using operators like "~>" and "|=>". Microsoft positions "pg_durable" for applications such as vector embedding pipelines, scheduled maintenance tasks, and workflows interacting with external APIs. Architecturally, it is minimal, comprising a Postgres extension and a background worker built on Rust libraries "duroxide" and "duroxide-pg".
Key takeaway
For Data Engineers or Software Engineers building fault-tolerant data pipelines, "pg_durable" offers a compelling alternative to complex external orchestrators. You can simplify your architecture by defining long-running, resilient workflows directly in PostgreSQL using SQL. This approach reduces operational overhead and ensures automatic recovery from failures, allowing you to consolidate workflow logic within your database. Consider evaluating "pg_durable" for new projects requiring robust, in-database task scheduling.
Key insights
"pg_durable" enables resilient, in-database SQL workflows, eliminating external orchestration for fault tolerance.
Principles
- In-database durability simplifies distributed systems.
- Workflows as SQL graphs ensure state persistence.
- Minimal architecture reduces external dependencies.
Method
Workflows are defined as SQL step graphs using "pg_durable"'s DSL, with operators like "~>" for sequential execution and "&" for parallel execution, managed by an internal background worker.
In practice
- Implement vector embedding pipelines directly in SQL.
- Automate scheduled database maintenance tasks.
- Orchestrate workflows dependent on external APIs.
Topics
- PostgreSQL Extension
- Durable Execution
- Workflow Orchestration
- SQL Workflows
- Vector Embeddings
- Fault Tolerance
Code references
Best for: AI Architect, AI Engineer, CTO, Software Engineer, Data Engineer, DevOps Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by InfoQ.