Questions tagged [cockroachdb]

Questions related to CockroachDB and how to install and set it up (secure and insecure) and run it across a cluster on any/all of the cloud vendors - and also on local/private clouds. Any particular database issues with CockroachDB (e.g. performance, PostgreSQL compatibility). Other database matters touching on CockroachDB as a db system would also be on-topic.

Filter by
Sorted by
Tagged with
1 vote
1 answer
29 views

A query, safe against concurrent writes with READ COMMITTED, also safe with SERIALIZABLE isolation level?

I have asked this question with a wonderfully informative answer: How to have uniqueness constraints for structures across multiple tables? The answer from Erwin Brandstetter suggests this: WITH ...
user avatar
  • 155
0 votes
1 answer
34 views

What happens to the n tables you insert into during a transaction?

With a database structure sort of like this: create table objects { uuid id; string type; } create table object_properties { uuid id; uuid source_id; // the object which has this property ...
user avatar
  • 155
1 vote
1 answer
76 views
+150

How to have uniqueness constraints for structures across multiple tables?

Say I have a schema system something like this: create table objects { uuid id; string type; } create table object_properties { uuid id; uuid source_id; // the object which has this property ...
user avatar
  • 155
3 votes
1 answer
92 views

Update all instances of key inside nested JSON array

I'm trying to update a complex JSON document stored in a table in CockroachDB. The CockroachDB query language is mostly Postgres compatible except for the lack of procedural code, so a Postgres answer ...
user avatar
  • 31
0 votes
1 answer
32 views

CockroachDB upgrade not finalized

I am running a three-node CockroachDB docker cluster (Debian OS) and I recently upgraded the cluster from version v21.1 to version v21.2 following the procedure outlined in the documentation using the ...
user avatar
0 votes
1 answer
72 views

CockroachDB or mariaDB cluster for many read slaves, 1 master?

I am after a recommendation on the following setup... 1 Master that has all tables. 1 main table ( table A ) that master will write to, and read. often. 5+ tables ( tables B+ ) master will read from ...
user avatar
  • 109
0 votes
1 answer
100 views

Error: pq: 1 columns must reference exactly 1 columns in referenced table (found 2) [closed]

I have a few tables and I am facing this issue most likely with the table "item". When I remove restaurant_id and category_id, it works fine. CREATE TABLE IF NOT EXISTS restaurant ( id ...
user avatar
1 vote
1 answer
546 views

Replicate Postgres to Cockroach

We are planning to replicate our Postgres database to Cockroach. We are looking for a relatively simpler solution to achieve that. Currently, we are working on a Stream based replication (something ...
user avatar
  • 155
-2 votes
1 answer
167 views

Is it efficient to design chat/likes/relationship database in separate table per user? [closed]

The specs: there would be about 1 billion users there would be probably 1 million topics each topics has subtopics stored at the same level as topics user has many to many relationship with topics (...
user avatar
  • 1,231