Microsoft Wants to Run Workflows Inside PostgreSQL

TL;DR: Microsoft has open-sourced a new tool for PostgreSQL called pg_durable. It allows developers to run complex workflows directly inside the database, which can simplify system design by removing the need for external orchestration tools.
Key facts
- Category
- Database
- Impact
- High
- Published
- Source
- InfoQ
Full summary
Microsoft's new tool lets developers run complex workflows directly inside their PostgreSQL database, simplifying system architecture and reducing dependencies.
Microsoft has released a new open-source tool called pg_durable, an extension for the popular PostgreSQL database. This tool introduces a powerful capability known as durable execution directly within the database itself. Durable execution allows developers to create and manage complex, long-running workflows that can withstand interruptions. For example, if a server reboots or a connection is lost in the middle of a multi-step process, a durable workflow can automatically resume from where it left off once the system is back online. This is achieved by storing the state of the workflow persistently inside the database tables. The extension provides simple functions for developers to start, signal, and query the status of these workflows, making it easier to build resilient applications. This approach treats complex business logic as a first-class citizen of the database, running alongside the data it operates on.
The primary benefit of pg_durable is architectural simplification. Traditionally, managing stateful, long-running tasks required external systems like workflow orchestrators or complex message queue setups. These tools, while powerful, add another component to the technology stack that must be deployed, managed, and monitored. This increases operational overhead, potential costs, and introduces another point of failure. By moving this orchestration logic into PostgreSQL, developers can reduce their system's complexity and dependencies. This is particularly valuable for teams building applications like e-commerce order processing systems, data ingestion pipelines, or user onboarding sequences, where reliability is critical. For CTOs and IT managers, this means a leaner infrastructure, potentially lower costs, and a more streamlined development process for their teams.
This release from Microsoft signals a growing trend of embedding more application logic directly into the database. While the concept of in-database workflows is not new, providing it as a simple, open-source extension for a widely-used database like PostgreSQL makes the pattern much more accessible. Developers now have a compelling alternative to evaluate against established external orchestration platforms. The decision will depend on the specific needs of their application, but pg_durable offers a tightly integrated solution that can simplify development and improve reliability for many common use cases. It also reinforces Microsoft's commitment to supporting and enhancing the open-source PostgreSQL ecosystem, even as it offers its own competing database services.
Why it matters
It simplifies application architecture by allowing complex, stateful workflows to run directly inside the database, removing the need for external orchestration systems. This can lead to leaner, more reliable, and easier-to-manage software.
Business impact
By reducing infrastructure complexity and operational overhead, this tool can lower total cost of ownership. It enables development teams to build resilient features faster, accelerating time-to-market for data-intensive applications.
Tags
Related on Notifire
Primary source: InfoQ