Version v1.x
PostgreSQL
Available in
.NET
Node.js
Python
Configure DurableStack with PostgreSQL for durable, distributed execution.
PostgreSQL is the recommended default for most production DurableStack deployments.
It supports durable state and multi-worker distributed coordination through shared tables.
Registration
using DurableStack.Hosting.DependencyInjection;
var connectionString = "Host=localhost;Port=5432;Database=durable_stack;Username=postgres;Password=postgres";
builder.Services.AddDurableStackPostgres(connectionString, options =>
{
options.WorkerName = $"orders-api-{Environment.MachineName}-{Environment.ProcessId}";
});
import { createDurableStackPostgres } from "durablestack";
const { runtime } = await createDurableStackPostgres(
{ connectionString: process.env.DATABASE_URL! },
{
workerName: `orders-api-${process.pid}`
}
);
Operational notes
- Run migrations on startup using your runtime's migration path (for example,
IDurableStackStoreMigratorin .NET). - Keep retention enabled to control run-history growth.
- Validate multi-worker behavior in staging before scaling out.