Catalogue / openai-2026-postgres-scaling

OpenAI keeps PostgreSQL on a single unsharded primary with nearly 50 read replicas and moves write-heavy workloads to sharded systems

OpenAI, 2026. PostgreSQL deployment behind ChatGPT and the OpenAI API.

Organisation
OpenAI
Evidence
Reported from production
Source
Scaling PostgreSQL to power 800 million ChatGPT users

OpenAI, published 2026-01-22

Records

Decision#d1

Leave PostgreSQL unsharded on one primary and move shardable write-heavy workloads to sharded systems

Decision#d2

Keep critical read-only requests served from replicas during a primary failure, and promote a hot standby

Decision#d3

Route low-priority and high-priority requests to separate PostgreSQL instances

Decision#d4

Put PgBouncer in front of PostgreSQL to pool connections, in the same region as clients and replicas

Decision#d5

Lock or lease a cache key on a miss so only one request reads it from PostgreSQL

Decision#d6

Rate-limit at the application, pooler, proxy and query layers, and block specific query digests in the ORM

Decision#d7

Allow only schema changes that do not rewrite a table, under a 5-second timeout, with rate-limited backfills

Failure#f1

Recurring SEVs in which a sudden rise in PostgreSQL load was amplified by retries

Sign in to read what was chosen, what was rejected and what it cost, each with its place in the source. An account is free. The job-queue cards are open without one.