Live data from Hacker News

Why CockroachDB and PostgreSQL Are Compatible

cockroachlabs.com

1–10 of 62 posts

Re: Why CockroachDB and PostgreSQL Are Compatible

#2
How compatible?

Can I just expect things like full text search to work? https://www.postgresql.org/docs/13/textsearch.html

What about additional but supplied modules like ltree? https://www.postgresql.org/docs/current/ltree.html

I ask as I saw a related article https://www.cockroachlabs.com/blog/full-text-indexing-search... recently and damn it looks close... has anyone migrated a prod system that uses the above? What did you encounter?

Re: Why CockroachDB and PostgreSQL Are Compatible

#3
post #2

How compatible? Can I just expect things like full text search to work? https://www.postgresql.org/docs/13/textsearch.html What about additional but supplied modules like ltree? https://www.postgresql.org/docs/current/ltree.html I ask as I saw a related article https://www.cockroachlabs.com/blog/full-text-indexing-search... recently and damn it looks close... has anyone migrated a prod system that uses the above? Wha…

Be very careful - even if things are compatible, in my experience some things do not perform as well in CockroachDB which seems a bit counter intuitive but can be very true... We had problems making date range queries fast with tiny amounts of data, for example.

I would seriously consider if you need CockroachDB - if you need that level of scaling you should also consider Cassandra (or Cassandra like) solutions as they will scale better but you will have to architect your app to think in this way (i.e. your app generates the views of the data it needs).

If you don't need to scale yet use Postgres. Every piece of complexity has a cost and Cockroach while incredibly clever adds complexity that you might not understand or desire to manage over time. A nice interface won't help you when replication between clusters breaks in production.

Re: Why CockroachDB and PostgreSQL Are Compatible

#5
post #3
post #2

How compatible? Can I just expect things like full text search to work? https://www.postgresql.org/docs/13/textsearch.html What about additional but supplied modules like ltree? https://www.postgresql.org/docs/current/ltree.html I ask as I saw a related article https://www.cockroachlabs.com/blog/full-text-indexing-search... recently and damn it looks close... has anyone migrated a prod system that uses the above? Wha…

Be very careful - even if things are compatible, in my experience some things do not perform as well in CockroachDB which seems a bit counter intuitive but can be very true... We had problems making date range queries fast with tiny amounts of data, for example. I would seriously consider if you need CockroachDB - if you need that level of scaling you should also consider Cassandra (or Cassandra like) solutions as th…

True, and you can go really far with postgresql alone, like zalado did (biggest german e-commerce platform):

https://github.com/zalando/patroni

Re: Why CockroachDB and PostgreSQL Are Compatible

#6
I am truly looking forward for CockroachDB to become the next PostgreSQL for planet-spanning database workloads. In our ecosystem we get more and more requests for CRDB integration.

Generally though, I would not say that full compatibility should even be desired. A k/v database simply works differently from a strictly relational database. There are things like shard IDs, avoiding hot spots, deciding on how to paginate data.

Going too much into "PostgreSQL" replacement will eventually hurt CRDB because too much focus will go into making legacy enterprise SQL (along the lines of https://news.ycombinator.com/item?id=25454635) work on this system. It's the forklift approach of moving to the cloud. This becomes clear when skimming through the docs:

- https://www.cockroachlabs.com/blog/how-to-choose-db-index-ke...

- https://www.cockroachlabs.com/docs/stable/performance-best-p...

- https://www.cockroachlabs.com/docs/stable/limit-offset.html

- https://www.cockroachlabs.com/docs/v20.2/selection-queries#p...

I think many of the "light SQL" patterns are really great - things like SELECT or WHERE, which e.g. DynamoDB can simply not solve without ElasticSearch. But all in all, I am very excited for CRDB to get more industry acceptance, and I think their cloud offering could also become very interesting - a competitor to Google BigTable / CloudSpanner, AWS DynamoDB or Cloud SQL.

Re: Why CockroachDB and PostgreSQL Are Compatible

#7
post #4

If you want to use the CockroachDB be aware of the license: https://www.cockroachlabs.com/docs/stable/licensing-faqs.htm...

(From the FAQs) How does the change to the BSL affect me as a CockroachDB user?

It likely does not. As a CockroachDB user, you can freely use CockroachDB or embed it in your applications (irrespective of whether you ship those applications to customers or run them as a service). The only thing you cannot do is offer CockroachDB as a service without buying a license.

- - - - -

Cockroach is asking not to take open source and start offering it as a service. Which sounds like completely reasonable thing to do!

Of late there has been plenty of fear mongering when it comes to licensing. I wonder if this is some paid blogs from cloud companies which helps form some opinions or the age old open source license-and-principles which hold little water with predatory cloud companies around.

Re: Why CockroachDB and PostgreSQL Are Compatible

#8
post #7
post #4

If you want to use the CockroachDB be aware of the license: https://www.cockroachlabs.com/docs/stable/licensing-faqs.htm...

(From the FAQs) How does the change to the BSL affect me as a CockroachDB user? It likely does not. As a CockroachDB user, you can freely use CockroachDB or embed it in your applications (irrespective of whether you ship those applications to customers or run them as a service). The only thing you cannot do is offer CockroachDB as a service without buying a license. - - - - - Cockroach is asking not to take open sour…

>Cockroach is asking not to take open source and start offering it as a service. Which sounds like completely reasonable thing to do!

But i just wrote "be aware of it", with that license i don't consider it "Free Software", just imagine Apache or Nginx would do that. On the other hand I'm totally fine if they want to protect themself from leeches like Amazon/Google/Oracle/IBM.

Re: Why CockroachDB and PostgreSQL Are Compatible

#10
post #9
post #4

If you want to use the CockroachDB be aware of the license: https://www.cockroachlabs.com/docs/stable/licensing-faqs.htm...

BSL is "delayed free software". Take the code, wait 3 years, then it's entirely free software.

>wait X years

It's three years, not X.

Post reply on HN