TLDR Web Dev · ARTICLES & TUTORIALS

MIGRATING TO POSTGRES

engineering.usemotion.com10 min read

Summary from the TLDR Web Dev newsletter

Motion previously used CockroachDB for its scalability, but recently migrated to Postgres due to escalating costs and performance issues. Its single-region setup didn't fully use CockroachDB's distributed capabilities. The migration addressed problems with Prisma migrations timing out, slow ETL processes, and inconsistent query speeds, where CockroachDB's query planner often resulted in slower performance than Postgres. A custom ETL solution was built using Bun to migrate the data.