Durable and auditable workflows with DBOS and ClickHouse Managed Postgres DBOS co-founder and CEO Qian Li published a guest post detailing how to run the open-source, Postgres-native DBOS durable execution library on ClickHouse Managed Postgres and replicate workflow data into ClickHouse using WalShadow for scalable analytics and long-term auditing. The setup stores workflow and step checkpoints, queues, schedules, messages, and application versions in Postgres so failed processes recover from their last completed step rather than restarting, and the tutorial walks through the DBOS Python quickstart, setting the DBOS_SYSTEM_DATABASE_URL environment variable, and testing recovery by stopping and restarting the application mid-workflow. The approach matters because it keeps workflow history available for auditing even after it is deleted from Postgres without overloading the operational database. This is a guest post from Qian Li, co-founder and CEO of DBOS. Building reliable applications is hard because failures can happen at any step. A payment workflow might time out while waiting for customer approval, an LLM API might become unavailable, or a server might crash halfway through execution. DBOS https://dbos.dev/ makes workflows durable by allowing them to recover from failures without restarting from scratch. But production systems face another challenge: how do you retain and analyze workflow history without overwhelming your operational database? In this blog post, we'll walk through how to set up DBOS with ClickHouse Managed Postgres https://clickhouse.com/cloud/postgres and use WalShadow https://github.com/ClickHouse/walshadow to replicate workflow data into ClickHouse for scalable analytics and long-term auditing, retaining workflow history even after it's deleted from Postgres. What is DBOS? DBOS is an open-source, Postgres-native durable execution https://www.dbos.dev/durable-execution library for building reliable AI agents, background jobs, and workflows. It provides failure recovery, durable queues, scheduling, and high-throughput execution without requiring a separate orchestration server. Architecturally, DBOS is deliberately simple. Instead of pushing reliability into an external orchestrator, it runs directly inside your application processes and stores execution state in Postgres, including workflow and step checkpoints, queues, schedules, messages, and application versions: Postgres serves as both the source of truth for execution state and the recovery mechanism: if an application process fails or restarts, DBOS recovers its workflows from their last completed steps rather than starting over. To scale out, you add more processes, without introducing a separate orchestration server on the critical path. With ClickHouse Managed Postgres https://clickhouse.com/cloud/postgres , you can run DBOS on managed Postgres infrastructure with fast NVMe performance while keeping workflow execution state in the same familiar database. Getting started with DBOS and ClickHouse Managed Postgres We'll use the DBOS Python quickstart https://docs.dbos.dev/quickstart for this tutorial. DBOS also supports TypeScript, Go, Java, and Rust pre-production . 1. Create a DBOS application First, create and activate a Python virtual environment: 1python3 -m venv dbos-app-starter/.venv 2cd dbos-app-starter 3source .venv/bin/activate Install DBOS and FastAPI used by the example application . Then initialize the starter application: 1pip install dbos 'fastapi standard ' 2dbos init --template dbos-app-starter 2. Connect to ClickHouse Managed Postgres In the ClickHouse Cloud console, open your Managed Postgres service and navigate to "Connect". Copy the Postgres connection URL, including the password. Set the DBOS SYSTEM DATABASE URL environment variable to your connection string: 1export DBOS SYSTEM DATABASE URL="