Questions tagged [cockroachdb]

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

CockroachDB is a scalable, geo-replicated, transactional SQL datastore being developed in .

References:

435 questions
0
votes
1 answer

CockroachDB: Simple SQL queries do not respond

I have setup CockroachDB according to the instructions at https://www.cockroachlabs.com/docs/stable/deploy-cockroachdb-on-premises-insecure.html. However, SQL queries take too long time and do not respond. The procedure of setupping cluster is as…
0
votes
1 answer

CockroachDB on AWS EKS cluster - [n?] no stores bootstrapped

I am attempting to deploy CockroachDB:v2.1.6 to a new AWS EKS cluster. Everything is deployed successfully; statefulset, services, pv's & pvc's are created. The AWS EBS volumes are created successfully too. The issue is the pods never get to a READY…
Koman
  • 187
  • 1
  • 1
  • 12
0
votes
1 answer

Transaction with inserts retried due to simultaneous select

I am running into an issue with transactions in cockroachDB. Periodically, a table is rebuilt using external data. My approach is to drop the table and re-populate the table from scratch within a transaction. I noticed that if a SELECT statement is…
Nikola
  • 11
  • 1
0
votes
3 answers

CockroachDB Cluster on Kubernetes Pods Crashing

I'm trying to install a CockroachDB Helm chart on a 2 node Kubernetes cluster using this command: helm install my-release --set statefulset.replicas=2 stable/cockroachdb I have already created 2 persistent volumes: NAME CAPACITY ACCESS MODES…
Alex W
  • 37,233
  • 13
  • 109
  • 109
0
votes
1 answer

Does CockroachDB support database level encryption

I understand that CockroachDB supports storage level encryption. However I would like to run multiple client DBs encrypted with client specific keys. Is it possible to achieve DB level encryption in CoackroachDB? Can I for instance use separate…
Mike
  • 1
0
votes
1 answer

CASCADE for dropIndex in CockroachDB

Liquibase: Following liquibase wrote for removing unq_customer_id constraint. I have used dropIndex, Since CockroachDB…
atish shimpi
  • 4,873
  • 2
  • 32
  • 50
0
votes
1 answer

Cockroachdb used all memory after start even though data size is only 2GiB

1.9 GiB database size on disk. 60 GiB memory. After start cockroach starts to use all memory and increase goroutines count, until it eats whole memory. gossip client (0/3 cur/max conns) gossip server (0/3 cur/max conns, infos 0/0 sent/received,…
0
votes
1 answer

pq.NewListener/Listen blocks with pq: syntax error at or near "listen"

I have minio/s3 object store with lambda notifications into cockroachdb (postgres db). I am trying to monitor these events with below golang code. package main import ( "database/sql" "encoding/json" "fmt" "github.com/lib/pq" …
cpuNram
  • 205
  • 2
  • 12
0
votes
1 answer

Need to batch INSERT with foreign key

I am currently using CockroachDB and need to batch insert store category code. Here is my current table schema CREATE TABLE storecategorycode( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), isenabled …
hinewwiner
  • 627
  • 13
  • 25
0
votes
1 answer

Can I decrease usage of Non-Table Cluster Data on my cockroach cluster?

On my cockroachDB cluster, the Time Series data grows up to about 1 GByte. Is there any way to decrease it? Thank you!
Ueda Takeyuki
  • 721
  • 10
  • 26
0
votes
2 answers

sql: Select count(*) - nth record from each group

I'm grouping by tenant_id. I want to select the count() - 1000th record (ordered by _updated time) from each GROUPBY group, for the groups where count() is greater than 1000. As follows: select t1.tenant_id, (select temp._updated from trace temp …
Jobs
  • 3,317
  • 6
  • 26
  • 52
0
votes
2 answers

sql: Delete oldest n records from each group

I'm using cockroachdb. For each group (grouped by id field), if the number of records exceeds 1000, I want to delete the oldest however_many records so that the number of records equal 1000 after the deletion. This is what I have so far: (select…
Jobs
  • 3,317
  • 6
  • 26
  • 52
0
votes
1 answer

Clarification on table creation error on CockroachDB

I have a framework which uses SQLalchemy to connect to SQL databases. I am trying to make it work with CockroachDB, even if official support is limited to MySQL, Postgres or Oracle. The operations I am performing work flawlessly with the supported…
jetstream
  • 106
  • 1
  • 10
0
votes
1 answer

How to fix password problem with CockroachDB and Spring-Boot

I have a problem with spring-boot and cockroachDB. On my local machine runs cockraochDB and spring-boot. As soon as spring boot starts , i'm getting an exception. Cockroach runs in insecure mode. application.yaml: spring: datasource: url:…
goku736
  • 372
  • 2
  • 16
0
votes
1 answer

sql: select if table exists

I'm trying to select all from db.table if db.table exists. I've tried if, exists, etc. and none works. What's the best way to do this? I'm using cockroachdb and psycopg2. Didn't find an existing answer (most are quite old) that I could use. For…
Jobs
  • 3,317
  • 6
  • 26
  • 52