Questions tagged [cockroachdb]

A scalable, geo-replicated, transactional SQL datastore developed in Go.

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

Is FaunaDB a good choice for a simple "Personal Finance Tracking" app or should I use CockroachDB?

I'm working on a personal project and I'm doing research on my tech stack. The objective is to build a simple Personal Finance tracking app. I was planning on using SvelteKit (w/Typescript + Vite) for ...
Kyle Leonard's user avatar
0 votes
1 answer
19 views

Using cockroachdb / postgresql in an iOS swift app

I'm trying to connect to a cockroachdb instance from within an iOS app being developed on Xcode. I am using the PostgresClientKit. I get an error saying: localizedSeverity: Fatal code: 0C800 message: ...
la44578's user avatar
0 votes
1 answer
20 views

How to change my region on CockroachDB Cloud?

I'm currently in AWS us-west-2 and I'm trying to find a solution to change region to California — possibly Google Cloud — as I'm using CockroackDB Cloud I've been searching for a while. I have a small ...
Laurent's user avatar
  • 2,086
-3 votes
0 answers
59 views

Why cockroachdb does not use SELECT FOR UPDATE in their documentation for transaction?

When you use transaction you lock the row with SELECT FOR UPDATE but why cockroachdb does not use SELECT FOR UPDATE in their example ? They use transaction so had cockroachdb a reason not to use this ?...
Jsjs's user avatar
  • 3
1 vote
0 answers
36 views

How to ignore getaddrinfo ENOTFOUND in NestJS (using TypeORM)

We have a NestJS application which is using TypeORM for the database layer. We are doing a lot of requests to the database, sometimes the DB refuses the connection and even after some retries it ...
Matthew Husák's user avatar
0 votes
1 answer
81 views

2 phase commit in CockroachDb

I don't want to write a long and complicated question. Is it possible to do 2 phase commits in CockroachDb natively similar to how it is done in Postgres? How do we do it in Postgres? PREPARE ...
Arnold Zahrneinder's user avatar
0 votes
1 answer
41 views

How can I update the statistics of a table in cockroachdb

In cockroachdb when I explain my query i see this root@:26257/management_console_production> explain select * from clusters; info --------------------------------...
alyshan's user avatar
  • 176
1 vote
0 answers
50 views

The database session is not closed

When calling the SetPersonStatusByName function, a non-closing session occurs. Question: Did I miss anything to close the session after calling this function? func (m *DBManager) SetPersonStatusByName(...
vovanchello's user avatar
0 votes
1 answer
211 views

How to connect to CockroachDB with docker-compose?

I have a docker-compose file in which I locally deploy the database and the application on go services: node_1: container_name: node_1 image: cockroachdb/cockroach:latest ...
vovanchello's user avatar
0 votes
0 answers
28 views

Block size in Pebble storage engine

I'm using Pebble as the storage engine for one of my projects. My approach involves sequential reading from the Pebble DB. It's noticed that this process is typically constrained by the IOPS of the ...
rishabh mittal's user avatar
0 votes
0 answers
31 views

How do I get psycopg_pool to connect to my Cockroach Database Cluster using psycog.crdb.connect which is supported in psycopg 3.1?

I'm using psycopg_pool (3.1.7) and would like to connect to a Cockroach Database Cluster. psycopg 3.1 has support for CRDB via psycopg.crdb.connect(), but I'm unsure how to get psycopg_pool to use ...
Ron's user avatar
  • 437
0 votes
0 answers
48 views

Networking issue between GCP instances - can't init Cockroach cluster

I deployed CockroachDB on Google Cloud Platform's Compute Engine using Terraform. I mainly followed the tutorial - Deploy CockroachDB on Google Cloud Platform GCE (Insecure). My issue is related to ...
Fala Baguete's user avatar
1 vote
1 answer
126 views

Multi cluster CockroachDB with Cilium Cluster Mesh

I am trying to enable a multi cluster CockroachDB spawning 3 k8s clusters connected with Cilium Cluster Mesh. The idea of having a multi cluster CockroachDB is described on cockroachlabs.com - 1, 2. ...
Krystian Marek's user avatar
0 votes
1 answer
284 views

"A PostgreSQL type with the name 'json' was not found in the database" - Npgsql & cochroach db

Using this code, A PostgreSQL type with the name 'json' was not found in the database Connection string var connString = "Host=REMOVE;Port=26257;Username=daniel;Password=REMOVED;Database=REMOVED&...
Daniel Dorman's user avatar
3 votes
0 answers
239 views

CockroachDB performance is much worse than mongoDB and Aurora?

I am doing some basic load testing against cockroachDB, mongoDB and Aurora. I just have a project which can keep read/write into one of those three DBs. In that project, we can configure groutine ...
xiaoyaoworm's user avatar
  • 1,062
0 votes
2 answers
160 views

CockroachDB equivalent of RowVersion in SQL

I'm trying to migrate my SQL db to CockroachDB. SQL Server has the RowVersion datatype which my database uses, which will automatically be generated every time a record is created, and then ...
Aiyuni's user avatar
  • 790
0 votes
1 answer
57 views

How to periodically delete data in CockroachDB

I am using CockroachDB for my newsletter project, and I want to delete rows every day when the data is unverified and the TTL stamp expired. It means it has to check both the "verified" ...
Chloe's user avatar
  • 3
2 votes
1 answer
48 views

Does CockroachDB support read only mode?

Can you connect to CRDB in a read only mode? So that a connection cannot make any writes?
alyshan's user avatar
  • 176
1 vote
1 answer
44 views

Kubernetes CockroachDB unable to access cluster externally

I installed cockroachdb via operator therefore used a kind: crdbcluster to spin up the cluster. Also using a metallb as loadbalancer. I'm trying to access a cockroachdb externally by exposing an ...
simone.benati's user avatar
0 votes
2 answers
136 views

Kubernetes: Haproxy ingress isn't taking on any addresses

I'm running Kubernetes v1.25.9+rke2r1. I have a Metallb correctly setup with an external ip address and haproxy ingress controller. I need to expose a cockroachdb instance via ingress and I set up ...
simone.benati's user avatar
0 votes
1 answer
244 views

In Jetbrains Rider Datagrip, exporting database with pg_dump throws a search_path error

I have a CockroachDB cluster that i have connected to through JetBrains Rider. I want to make sure I can export all the data (as a backup, for example) using pg_dump. However, when running the export ...
Davrozz's user avatar
  • 55
0 votes
0 answers
26 views

How to Connect 2 Cockroachdb Cluster in Kubernetes

I have the following problem. In Kubernetes I have 2 clusters that I want to connect via Join. The clusters are running. The connection must be secure. I have created the CA of the old cluster. ...
Eugen Itskovich's user avatar
0 votes
1 answer
24 views

How to create trigram index on json attribute in cockroachdb?

Is there a way to create trigram index on a json attribute in cockroach DB just like normal columns like CREATE INDEX ON t USING GIN (a, w gin_trgm_ops)?
RCX's user avatar
  • 61
0 votes
1 answer
95 views

DISTINCT on Two Individual Columns instead of Group of Two Columns

Table: Campaign_mapping campaign_id emailid_id 1 1 1 2 1 3 2 2 4 4 5 4 6 5 7 7 8 6 Table: Leads id campaign_id emailid_id data_a data_b data_c 2 1 a b c 3 2 2 a1 b2 c3 4 3 a2 b3 c4 5 ...
Abhishek Anand's user avatar
0 votes
1 answer
48 views

How to connect Heroku Discord Bot to CockroachDB?

I currently have a discord bot built with Nextcord.py with a working database on CockroachDB. I managed to host and deploy the bot on Heroku and commands work, but I can't seem to get the database to ...
Natan Niemetz's user avatar
0 votes
2 answers
142 views

Why is method annotated with @PrePersist not called on @Entity class with @IdClass?

Why is method annotated with @PrePersist not called when persisting class annotated with @Entity and @IdClass? Folder (entity) @Data @Entity @NoArgsConstructor @AllArgsConstructor @Builder(toBuilder = ...
joshuatvernon's user avatar
0 votes
1 answer
45 views

How can I run the YCSB workload on CockroachDB?

I want to run the "Yahoo! Cloud Serving Benchmark" on CockroachDB for evaluation. Is there a dedicated testing manual or documentation for using YCSB to test CockroachDB? I tried using the ...
Jayant's user avatar
  • 66
2 votes
1 answer
491 views

JOOQ: Database version is older than what dialect COCKROACHDB supports: 13.0.0

We use CockroachDB 22.2 and JOOQ 3.18.2. In our logs, this message appears: Database version is older than what dialect COCKROACHDB supports: 13.0.0. Consider https://www.jooq.org/download/support-...
Ondra Žižka's user avatar
-2 votes
1 answer
105 views

How can I bulk insert test data into a table in postgresql or cockroachdb?

In procedural SQL, I could write a loop that used an incrementing variable to build data rows and insert them into a table one by one. Is there a way to get the same effect using the regular SQL ...
histocrat's user avatar
  • 2,311
0 votes
1 answer
361 views

Can't get celery results in django-db backend but my settings seem to be correct (Django, Postgres, Redis)

I cannot get celery results to store in my django-db backend- I have tried many solutions without any luck. I'm kind of stuck at this point.. however, I suspect this has something to do with cockroach-...
chrisr's user avatar
  • 1
0 votes
1 answer
129 views

Is there a way to modify the output format of cockroach DB's cli?

Is there a way to modify the output format of cockroach sql to only return the results? I've tried csv and raw closest thing to this is csv but it still adds the header + timing info at the end, can ...
RCX's user avatar
  • 61
0 votes
1 answer
80 views

How to auto-generate unique_rowId with Fluent Migrator in CockroachDB?

I'm using Fluent Migrator in NET 6. I'm trying to set an unique_rowId to an int64 column. On cockroach DB, I would use Create table x (version INT NOT NULL DEFAULT unique_rowid()) With fluent ...
Aiyuni's user avatar
  • 790
-1 votes
1 answer
43 views

Distribution on nodes

I started a CockroachDb in a SIngel cluster with 5 nodes and try to store a table on 3 Specific Nodes. Unfortunately it does not work. Since someone has experience with this ALTER TABLE belegdaten ...
Eugen Itskovich's user avatar
0 votes
2 answers
583 views

AWS Glue: SCRAM authentication requires libpq version 10 or above [Using CockroachDB]

I have a glue job using psycopg2 that was previously working, and now is throwing this error: OperationalError: SCRAM authentication requires libpq version 10 or above. Here is the psycopg2 version ...
eclipse's user avatar
  • 33
1 vote
0 answers
295 views

How to run node pg in Cloudflare Pages (server-side for CockroachDB)

I'm trying to tighten up my database calls, and I'd really like to be able to just use the pg node package in my +page.server.ts file in my SvelteKit app. Having to call a lambda to get the data is ...
Joel Hager's user avatar
  • 3,042
2 votes
1 answer
110 views

How to run DBT with Cockroach DB?

I am building dbt models using multiple database connectors that my organization uses for many cases. We also use CRDB which is the only database not supported by dbt in my organization. My problem is ...
Ada's user avatar
  • 21
0 votes
1 answer
214 views

cockroachdb data not replicating

I am testing multi-master region setup in cockroach db (version v22.1.0 / Ubuntu 20.04): cockroach start --insecure --store=server1 ... cockroach start --insecure --store=server2 ... cockroach init --...
Falcon's user avatar
  • 47
0 votes
1 answer
100 views

Why are CockroachDB S3 backup commands giving me an invalid delimiter?

I'm using an AWS S3-compatible service for storing CockroachDB backups, but on recent versions the service has started giving me errors about the length of the file delimiter, even though I'm not ...
histocrat's user avatar
  • 2,311
0 votes
1 answer
38 views

INSERT or SUM multiple rows at once

I want to increase multiple values at once, with the following logic: if the value does not exist, create a new row with the value, otherwise sum with the existing value on the database. To achieve ...
Stefano's user avatar
  • 58
-2 votes
1 answer
54 views

1 service 1 Database Pattern is not required anymore when using cockroachDB

Since cockroachDB is scalable RDBMS, as per my understanding we do not need the Master-Slave pattern anymore, since every request will be served equally by each node. However, do we still need 1 ...
Bondhan Novandy's user avatar
0 votes
2 answers
226 views

Failure when running CockroachDB Helm Chart on Minikube: "Creating data directory: mkdir /cockroach/cockroach-data/auxiliary: permission denied"

When I try to run the cockroachdb on minikube v1.29.0 on Fedora 37 (selinux disabled) with default parameters, 2 of 3 nodes fails with the following error: Creating data directory: mkdir /cockroach/...
Lerenn's user avatar
  • 607
0 votes
1 answer
97 views

how to execute Cockroach SQL via HAProxy and to ensure that the SQL query continues to execute even if primary node is down

I'm working on docker cockroachdb 3 node cluster with haproxy in my work space where i suppose to execute cockroach sql via HAProxy and have to ensure that the SQL query continues to execute even if ...
Ramke's user avatar
  • 1
0 votes
1 answer
43 views

Migrating millions of rows based on derived data in CockroachDB?

For the purpose of this post, I'm going to over simplify my data model to just the necessary pieces. I have a data model that looks like this... table Workspace { id } table Posts { id ...
Scalahansolo's user avatar
  • 2,705
1 vote
1 answer
205 views

Performance of LWT in scylla/cassandra

Wanted to understand the why do we say the throughput of whole Cassandra/scylla/cockroachDB setup is dependent on LWT/linearised TX. LWT will affect throughput of a hot key (index or row with a lot of ...
siddharthabhi30's user avatar
0 votes
1 answer
488 views

How do I export data into a CSV in CockroachDB using a custom delimiter?

How do I export a cockroach table into a local CSV in CockroachDB using a custom column delimiter? The following statement does not allow me to specify a custom delimiter cockroach sql -e "SELECT ...
Xin Hao Zhang's user avatar
0 votes
1 answer
168 views

CockroachDB Kubernetes Cluster Ingress Setup

So my goal is to be able to access my CockroachDB from domain like db.test.com with cert. I want to use cert-manager letsencrypt to issue keys. And it should work with CF (in non proxy mode as I think ...
Immutable's user avatar
0 votes
1 answer
267 views

Update or insert (gen_random_uuid) if no UUID is provided

Suppose I create a table of tasks. CREATE TABLE todos ( id UUID DEFAULT gen_random_uuid PRIMARY KEY, text STRING(1000) ) An end-user creates some new todos (which don't yet have an id/UUID) and ...
dgh's user avatar
  • 9,029
1 vote
1 answer
42 views

How can I debug a stuck cockroachdb upgrade?

I'm seeing signs that my CockroachDB cluster isn't able to finalize a version upgrade: SHOW CLUSTER SETTING version shows a version older than the binary's version, and I'm getting errors when trying ...
histocrat's user avatar
  • 2,311
1 vote
1 answer
50 views

Does cockroachdb support mTLS?

I need CockroachDB to work securely in my particular cloud setup. Specifically, I need it to perform mutual TLS authentication both when serving SQL and when making outgoing requests via changefeeds, ...
histocrat's user avatar
  • 2,311
2 votes
0 answers
56 views

Can't connect to cockroachdb on gcp

I deployed a CockroachDB cluster on a 4 gcp instances in a secure mode and configured a TCP proxy load balancer to distribute the traffic, but when I try to connect to it through the load balancer ...
Naran's user avatar
  • 55

1
2 3 4 5
9