# pg_durable | Microsoft | Knowledge Base | Instagit

PostgreSQL in-database durable execution

GitHub Stars: 1.7k

Repository: https://github.com/microsoft/pg_durable

---

## Articles

### [How the pg_durable Worker Coordinates with User Sessions Using the _worker_ready Table](/microsoft/pg_durable/worker-coordination-_worker_ready-table-pg_durable)

Discover how the pg_durable worker coordinates with user sessions using the _worker_ready table. Learn about the sentinel record and is_worker_ready() function for ensuring active and schema-compatible worker execution.

- Tags: internals
- Published: 2026-06-08

### [How the `df.seq()` Function and the `~>` Operator Implement Sequencing in the pg_durable DSL](/microsoft/pg_durable/relationship-df.seq-operator-pg_durable-dsl)

Discover how the df.seq() function and the ~> operator in pg_durable implement sequencing, ensuring left-to-right workflow order with THEN execution nodes.

- Tags: internals
- Published: 2026-06-08

### [What Is Deterministic Replay in Duroxide and Why pg_durable Orchestrations Require Deterministic Code](/microsoft/pg_durable/deterministic-replay-duroxide-deterministic-code-pg_durable)

Understand deterministic replay in Duroxide and why pg_durable orchestrations need deterministic code for crash recovery and exact-once guarantees.

- Tags: deep-dive
- Published: 2026-06-08

### [How Row-Level Security (RLS) Isolates Users' Durable Function Instances and Variables in pg_durable](/microsoft/pg_durable/rls-isolation-durable-function-instances-variables-pg_durable)

Discover how pg_durable leverages Row-Level Security RLS to isolate user's durable function instances and variables, ensuring secure and private data handling within PostgreSQL.

- Tags: internals
- Published: 2026-06-08

### [Security Considerations for Using `df.http()` in pg_durable and the `http-allow-azure-domains` Cargo Feature](/microsoft/pg_durable/security-considerations-df.http-pg_durable-azure-domains)

Secure your pg_durable deployments by understanding df.http() security. Learn how http-allow-azure-domains prevents SSRF by validating Azure domains.

- Tags: best-practices
- Published: 2026-06-08

### [How pg_durable Persists State Across PostgreSQL Crashes Using Runtime State Tables](/microsoft/pg_durable/persist-state-across-crashes-pg_durable)

Learn how pg_durable persists state across PostgreSQL crashes using runtime state tables. It stores metadata in WAL-protected tables for exact replay after restarts.

- Tags: internals
- Published: 2026-06-08

### [How pg_durable Detects Extension Drop/Recreate Events and Restarts Its Background Worker](/microsoft/pg_durable/detect-extension-drop-recreate-restart-worker-pg_durable)

Discover how pg_durable detects extension drop/recreate events and restarts its worker using catalog polling and a UUID sentinel for seamless background process management.

- Tags: internals
- Published: 2026-06-08

### [How df.cancel() Interacts with the Duroxide Runtime in pg_durable: Cancellation Flow Explained](/microsoft/pg_durable/df.cancel-duroxide-runtime-interaction-pg_durable)

Understand the df.cancel() interaction with Duroxide runtime in pg_durable. Learn the cancellation flow from PL/pgSQL to Rust and Tokio for graceful worker shutdowns. Explore the repository now.

- Tags: internals
- Published: 2026-06-08

### [Epoch Sentinel Mechanism in pg_durable: How the Background Worker Detects Extension Drop-and-Recreate Races](/microsoft/pg_durable/epoch-sentinel-mechanism-pg_durable-background-worker)

Learn how the epoch sentinel mechanism in pg_durable detects extension drop-and-recreate races with a UUID heartbeat, ensuring the background worker restarts its runtime before operating on stale data.

- Tags: internals
- Published: 2026-06-08

### [df.if() vs df.if_rows() in the pg_durable DSL: Conditional Branching Explained](/microsoft/pg_durable/difference-df.if-vs-df.if_rows-pg_durable-dsl)

Understand the difference between df.if() and df.if_rows() in pg_durable. Learn how to optimize conditional branching and eliminate extra database queries for better performance.

- Tags: deep-dive
- Published: 2026-06-08

### [How pg_durable Initializes the Duroxide Runtime at Startup via Its Background Worker](/microsoft/pg_durable/how-pg_durable-initializes-duroxide-runtime-startup)

Discover how pg_durable initializes the Duroxide runtime at startup. This PostgreSQL extension utilizes a background worker to spin up Tokio and start the Duroxide state-machine engine.

- Tags: internals
- Published: 2026-06-08

