Microsoft Just Made Database Transactions Immortal. Here's Why It Matters.
Last week, Microsoft dropped something unusual into the open source world. It's a PostgreSQL extension called pg_durable, and it solves a problem you probably didn't know you had.
The problem is simple: your code crashes. Databases fail. Networks drop packets. When any of that happens mid-transaction, you lose work, you build retry logic, and you pray.
pg_durable changes the game by making database functions "durable." That means once a function starts running inside PostgreSQL, it keeps running no matter what — even if the server restarts, the connection drops, or the Python runtime explodes.
Most people think this is just another transaction management tool. That's wrong. This is about turning your database into a reliable execution engine for long-running workflows.
Here is the data point that made me pay attention: According to a Bloomberg report from May, Microsoft has been running this internally for over a year. They claim it reduced their distributed transaction failures by 97%. That's not a small number.
The way it works is clever but not magic. pg_durable snapshots the function's state regularly, logs it to the database, and on restart it picks up exactly where it left off. It's like a save point in a video game, but for your code.
Why does Microsoft care about this? Because they run Azure, and Azure runs millions of database-backed workflows that need to survive failures. The New York Times noted in late 2025 that Microsoft's internal incident rate dropped sharply after adopting this pattern.
Here is the twist: this isn't about PostgreSQL specifically. It's about a broader shift toward "in-database computing." We've been moving logic into databases for years — stored procedures, triggers, now this.
The old belief was: keep your database dumb, put logic in the application layer. That belief is crumbling. Databases are becoming runtime environments.
Google has a similar approach with Spanner's commit timestamps. Amazon has Aurora's multi-master. But neither open-sourced their internal durable execution layer. Microsoft did.
What this means for you: if you're building any system that needs guaranteed completion — payment processing, order fulfillment, IoT data pipelines — pg_durable eliminates an entire category of bugs. No more retry loops. No more "what if the worker dies."
But there's a catch. This extension only works for functions written in PL/pgSQL or PL/Python. If you're in JavaScript or Rust, you're out of luck for now. Microsoft hinted in their GitHub repo that more language support is coming, but they didn't say when.
The real question nobody is asking: does this make PostgreSQL a better execution engine than dedicated workflow systems like Temporal or AWS Step Functions? Probably not for complex orchestrations. But for simple, database-local workflows, it's a massive win.
I expect to see this pattern copied by other databases within 12 months. MySQL will get a clone. SQLite will get a lightweight version. The industry is moving toward making data and code inseparable.
The smart move today? Download the extension, test it on a non-critical path, and watch for the inevitable performance benchmarks. Because when your database becomes your execution environment, the rules change.
💬 Comments