Re:Migrating to CockroachDB
by arjunbajaj on Friday February 07, 2020 @02:48AM
(#22263980)
Does CockroachDB work with Ecto in Elixir? Can it be used as a drop-in replacement for PostgreSQL?
[ Parent
| on HN ]
The Postgrex driver works with cockroach as-is, and they're open to making tweaks as necessary (I made a small patch to Postgrex to support the way cockroachdb encoded empty arrays and it was quickly accepted).
I don't think Ecto works as-is, you'd have to check.
For simple apps, it might be a drop-in replacement, or require very few tweaks. In addition to the issues mentioned in the OP, the cockroachdb documentation has a detailed list of differences (1).
(1) https://www.cockroachlabs.com/docs/stable/detailed-sql-suppo...
Re:Migrating to CockroachDB
by andreimatei1 on Friday February 07, 2020 @08:34AM
(#22265767)
Would you mind providing a link to the empty arrays patch? Is this something CRDB should fix?
It was fixed in CRDB also: https://github.com/cockroachdb/cockroach/issues/42942
Re:Migrating to CockroachDB
by arjunbajaj on Friday February 07, 2020 @05:40AM
(#22264767)
Thanks for the quick response.
Our goal is to make switching over from PostgreSQL easy. For Ecto in particular, we have a tracking issue that shows the items in our backlog that would improve compatibility: https://github.com/cockroachdb/cockroach/issues/33441