New development, general questions

Hello. I just spent some time converting an app to use CockroachDB and had a few questions.

  1. Our integration tests are about 2.5x slower than with a [tweaked] Postgresql. I’m running start-single-node with --store=type=mem,size=3GiB. Are there any other options, including unsafe ones, that I can try? With postgresql (locally and in our CI), we use unlogged table and disable fsync.

  2. I periodically get the following error, which seems odd given that I’m using start-single-node:
    storage/queue.go:1147 [n1,replicate] 4 replicas failing with "0 of 1 live stores are able to take a new replica for the range (1 already has a replica); likely not enough nodes in cluster

  3. Is there any way to force some tables to be fully replicated? We have a handful of very small tables that are frequently joined and having them on each node would, I assume, greatly improve performance

  4. Is there any way to tell if an upsert was an insert or an update? In Postgresql, the unofficial way to return xmax, but I couldn’t find anything similar in Cockroach.

Aside from that, it’s been pretty smooth. The lack of triggers and partial indexes (especially for on conflict), have probably been the hardest to deal with. Being able to index arrays, having passwords with --insecure (our network is already secure, why should we double encrypt everything?), and full text search, would all be nice to have. But everything here has an open issue in Github and can be worked around in the meantime.