Migrating to Postgres
Published on: 2025-07-09 07:39:45
Migrating to Postgres Sean Callahan Follow 8 min read · 1 day ago 1 day ago -- Listen Share
Since early 2022, Motion was on CockroachDB. Cockroach has many qualities going for it: effortless horizontal scaling, especially when dealing with multi-region set ups, extremely high availability, and a SQL-compatible interface. Early on, there were concerns about the eventuality of a multi-region setup (mandated by GDPR), and how exactly a traditional set up on Postgres would scale.
However, as Motion grew, so did our usage and costs. By 2024, Motion’s CockroachDB bill had 5x-ed to the mid 6 figures, and some of the cracks were beginning to show. None of our customers had required data localization yet, and we were still in a single region doing fairly simple transactional queries — so why pay the cost of a distributed database at all?
Fortunately for us, we had an ORM that made testing head to head relatively trivial.
Migrations
As the size of our database grew, we would frequently get
... Read full article.