Migrating from Postgres to CockroachDB ↦
This is a nice lessons learned post from one engineering team making a database switch.
Overall, I’m happy with how the effort turned out and with CockroachDB in general. Because it uses PostgreSQL’s wire protocol, existing PostgreSQL drivers should work as-is. But we did run into some challenges that are worth pointing out. Here’s a list of things you might want to consider…
I like the update at the end, which emphasizes the important of tests for making a switch of this magnitude:
The system that was migrated has solid tests and good coverage. While a lot of the differences we ran into are obvious (like lack of range types and triggers), others were more subtle (especially the odd on conflict behavior). Test coverage made a pretty significant impact in the speed of the migration and our confidence in pushing live.
Sign in or Join to comment or subscribe