Postgres transactions are a distributed systems superpower(dbos.dev)
217 points by KraftyOne 1 day ago | 92 comments
tl;dr: Co-locating workflow state and application data in the same Postgres database lets you commit both in a single transaction, eliminating the idempotency and atomicity problems that plague durable workflow engines. This means transactional steps get exactly-once semantics without bookkeeping tables, and you can replace the transactional outbox pattern by enqueuing workflows via a UDF in the same transaction as your app updates. The post is from DBOS, which builds a Postgres-backed durable execution framework around this idea.
HN Discussion:
  • Personal validation from experience that DB+queue atomicity is impossible without this approach
  • Confirmation from practitioners who built similar in-database queue/pubsub solutions successfully
  • Skepticism that this qualifies as a distributed system rather than centralized services
  • ~Confusion about the UDF/outbox replacement claim since side effects still require idempotency
  • Criticism that centralizing on Postgres creates a single point of failure