Notion’s PostgreSQL Sharding: Key Decisions, Migration Process, and Hard Lessons
In early 2021 Notion transformed its monolithic PostgreSQL into a horizontally partitioned fleet by sharding the block table and related data, using workspace IDs as the partition key, migrating through double‑write, backfill, and verification steps, and learning hard lessons about timing, zero‑downtime, and schema design.
