Catalogue / motion-2025-postgres-migration

Motion leaves CockroachDB for Postgres after migration timeouts and a fivefold bill, cutting over with a custom ETL script in under an hour of downtime

Motion. Primary application database (CockroachDB, then Postgres).

Organisation
Motion
Evidence
Reported from production
Source
Migrating to Postgres

Motion Engineering Blog (Medium), published 2025-05-13 (Read from an archive copy captured in August 2025. The post does not date the cutover; it dates the problems to 2024.)

Records

Decision#d1

Move a single-region transactional workload off a distributed SQL database to Postgres

Failure#f1

Schema migrations kept timing out on CockroachDB as the database grew, blocking deploys and version upgrades

Failure#f2

ETL from CockroachDB kept stalling and paging through an alpha connector with a memory leak

Failure#f3

Periodic, never-explained connectivity failures to the hosted CockroachDB cluster over Tailscale

Failure#f4

A bug rolled out by the database vendor took the product down, with support behind a separate slow portal

Failure#f5

A running expensive query could not be cancelled across the cluster's nodes in time

Decision#d2

Cut over with a hand-built dump-and-stream script in a maintenance window, not an off-the-shelf ETL tool

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.