OpenAI reveals how it scaled PostgreSQL to handle millions of queries per second for 800 million ChatGPT users. The key insight? A single primary Azure PostgreSQL server with nearly 50 read replicas can handle massive global traffic — way more than most engineers thought possible. But it wasn’t easy. They faced serious outages from cache failures, expensive joins, and write storms that triggered cascading failures. PostgreSQL’s MVCC system creates performance bottlenecks under heavy writes because even updating one field copies the entire row. Despite these challenges, OpenAI’s optimizations prove that PostgreSQL can power even the largest AI workloads. Why it matters: This shows that battle-tested open-source databases can scale to meet the demands of the world’s most popular AI products, challenging the assumption that you need exotic distributed databases for such workloads.