Durable and auditable workflows with DBOS and ClickHouse Managed Postgres
DBOS, an open-source Postgres-native durable execution library, stores workflow and step checkpoints, queues and schedules in Postgres so crashed processes resume from the last completed step without a separate orchestrator. The walkthrough runs the DBOS Python starter app against ClickHouse Managed Postgres, then uses WalShadow (private preview) to replicate the dbos schema from the Postgres WAL into ClickHouse. With WalShadow's soft-delete setting, deletions arrive as tombstone rows (_is_deleted = 1, _commit_ts) in a ReplacingMergeTree. That lets teams keep short retention in Postgres (e.g., seven days) while holding years of auditable workflow history in ClickHouse.
Related posts
- Running Durable Workflows in Postgres using DBOS
Supabase mediumAdeptDBOS implements durable workflows entirely in Postgres: workflow and step decorators record a workflow's ID, inputs and status in a workflow_status table and each step's output in operation_outputs, all within a separate system database. On restart, a background thread re-runs PENDING workflows with their original inputs and skips steps whose outputs are already stored, so execution resumes from the last completed step. This relies on workflows being deterministic. Because a step transition is a ~1ms Postgres write rather than a ~100ms external dispatch, DBOS claims 25x the speed of AWS Step Functions, and it offers exactly-once transactional steps and idempotency keys used as workflow IDs.
- Postgres at Open House NYC
ClickHouse easyNovice
ClickHouse used its Open House NYC keynote to launch WalShadow, an open-source engine that replicates Postgres into ClickHouse from the physical WAL instead of logical replication. It decodes WAL outside the source and uses a schema-only shadow Postgres to track DDL, effectively making ClickHouse an analytical physical standby. On 8-vCPU instances it showed about 200 ms commit-to-visible latency and 300K rows/s, versus about 10 s and 120K rows/s for PeerDB. The keynote also opened a Google Cloud private preview of ClickHouse Managed Postgres and released a chdb Postgres extension that extends COPY to import from S3, GCS and Azure and outperformed DuckDB-based extensions on the NYC Taxi import benchmark.
- What's New in DBOS - October 2026
DBOS mediumAdeptDBOS Transact adds workflow rewind to any step, which discards checkpoints from that step onward and re-executes while preserving the workflow ID. It also adds ownership tokens, verified in the same transaction as each checkpoint write, so zombie executors stop at their next checkpoint instead of overwriting recovered workflows. A new commercial Enterprise extension now holds the Conductor client and adds automatic workflow version upgrades, coordinated with Postgres advisory locks and a grace period for running workflows. It also adds horizontal scaling over sharded Postgres: a shard_key colocates each workflow's state on one shard, and benchmarks show linear scaling past 1 million workflows per second.
- Introducing WalShadow: Sub-second Postgres replication to ClickHouse from physical WAL
ClickHouse mediumAdept
WalShadow is an open-source engine that replicates Postgres to ClickHouse by decoding the physical WAL stream outside the source database, instead of using logical replication slots. It replays catalog records into a schema-only shadow Postgres to track schema changes, decodes heap records in parallel with Rust workers, batches rows into ClickHouse-native blocks and inserts them concurrently. Out-of-order arrival is handled by tagging rows with the source LSN, with barriers for schema changes and truncations. In a single-table benchmark on c8i.2xlarge instances it reached about 200 ms commit-to-visible latency and 289K rows/sec, versus about 10 s and 120K rows/sec for the logical-replication-based PeerDB.
- Change Data Capture (CDC) with PostgreSQL and ClickHouse - Part 1
ClickHouse mediumAdept
Postgres-to-ClickHouse CDC can be built by streaming row changes from Postgres logical decoding (pgoutput plugin, replication slots, LSN ordering) through Debezium and Kafka, then applying them in ClickHouse with the ReplacingMergeTree engine. Updates and deletes become immutable inserts carrying a version column and a deleted flag, and background merges collapse duplicates. Correct results before a merge require FINAL at query time. Consumers must tolerate duplicate events after restarts, and deleted rows are only purged when clean_deleted_rows is set to Always, a setting with a known bug as of 23.5. The post also compares pull-based and push-based CDC and explains why a Kafka queue protects the Postgres WAL from growing when ClickHouse is unavailable.