Does Postgres Scale?

· coding ai-agents databases · Source ↗

TLDR

  • DBOS benchmarks a single RDS Postgres instance (96 vCPUs, 384 GB RAM, 120K IOPS) and finds it handles 144K writes/sec or 43K durable workflows/sec.

Key Takeaways

  • Raw write ceiling: 144K small inserts/sec (12B/day) on a single db.m7i.24xlarge; bottleneck is WAL flush via group commit, not CPU or IOPS.
  • Durable workflow throughput (2 writes each): 43K workflows/sec; larger workflow_status schema (31 cols, 9 indexes) drops this from raw insert peak.
  • Postgres-backed queue throughput hits 12.1K workflows/sec single-queue due to lock contention at queue head; sharding across multiple queues raises it to 30.6K/sec.
  • Queue contention is partly language-specific: Python requires many concurrent clients to saturate Postgres, worsening dequeue row contention; Go would reduce this.
  • All benchmark code is open-source; results are specific to write-dominated, no-op workflow workloads with no compute-heavy steps.

Hacker News Comment Review

  • Commenters flag that sustained write rates may degrade at scale due to index growth; one commenter noted real slowdowns on multi-row inserts as table size grows, questioning linear extrapolation.
  • The horizontal scaling and HA question is unaddressed: the benchmark is purely vertical; no coverage of replication, zero-downtime upgrades, or multi-node setups.
  • Broad consensus is that Postgres is sufficient for most workloads, but premature scaling anxiety drives teams toward unnecessary complexity before they hit real limits.

Notable Comments

  • @q3k: Raises that vertical scaling is shown but horizontal HA and zero-downtime upgrades are not addressed.
  • @subhobroto: Positions DBOS as “docker compose to Temporal’s Kubernetes” for durable workflows in Python, argues DBOS is underrated relative to Temporal.

Original | Discuss on HN