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

sql attack secure INSERT from golang postgres when insert members and their values are few

I have cockroach db table created: CREATE TABLE IF NOT EXISTS wh ( id UUID NOT NULL DEFAULT gen_random_uuid(), enable VARCHAR(3), endpoint VARCHAR, auth_token VARCHAR, client_cert VARCHAR ); And golang struct: type whPOSTReq struct…
cpuNram
  • 205
  • 2
  • 12
0
votes
1 answer

Alter the definition of the Stored Computed Column in CockroachCloud

I have stored computed column defined as: ALTER TABLE computed_column AS INT col1+col2 STORED; Is there way to change the calculation to col1+col3 without first dropping the computed_column?
Saqib Ali
  • 3,953
  • 10
  • 55
  • 100
0
votes
1 answer

Replacing postgres stored procedure in php

I'm faced with the task of running a third party software with cockroachdb instead of the supported postgresql. I naively thought it would be a simple conversion as cockroachdb is a superset of postgresql. However as I work on the conversion I…
Mark
  • 113
  • 7
0
votes
1 answer

CockroachDB CSV import failing due to null column

I have a CSV exported from a table in another cockroachDB database. When trying to import this CSV to another cockroachDB instance I get the error could not parse "NULL" as type int The failing column has type INT8 and is nullable. Is there a way…
kcon123
  • 460
  • 2
  • 5
  • 13
0
votes
1 answer

Is it possible to use cockroach gen_random_uuid() function inside JSON data while inserting into JSON datatype in cockroachDB

I am new to cockroach DB and was wondering if the below ask is possible One of the columns in my table is of JSON type and the sample data in it is as follows { "first_name": "Lola", "friends": 547, "last_name": "Dog", "location":…
GVR
  • 320
  • 1
  • 3
  • 15
0
votes
1 answer

Cockroach DB multi-tenancy IMPORT error for sql dump import

I am trying to import a sql dump into a cockroachdb and getting the following error: IMPORT is unsupported in multi-tenancy mode I have created an instance of CockroachCloud Free hosted on Google cloud Platform and have successfully connected to…
DotPi
  • 3,977
  • 6
  • 33
  • 53
0
votes
1 answer

Get average duration per week-day from a list of records with start and end date

I have a input table with three columns : id => string start_date => timestamptz end_date => timestamptz I want to get the average duration in seconds (end_date - start_date) per week-day number over records. My problem is : If I have a record…
0
votes
3 answers

Row level locking in CockroachDB

I need to take row level lock for update and at the same time allow other select queries to get their intended row which is not locked. What I observed was if I take a lock on row1, no other select queries are allowed which are searching for other…
0
votes
2 answers

After Alter Rename to with table, we cant create the table with old name

Unable to create table with old name after using Alter Rename to (renamed table) Alter table testdb rename to testdb2 now not able to create table with testdb Cockroach Db Version: 19.1.2
Madhu
  • 13
  • 4
0
votes
1 answer

CockroachDB distributed workload on all nodes

I've deployed a CockroachDB cluster on Kubernetes using this guide: https://github.com/cockroachlabs-field/kubernetes-examples/blob/master/SECURE.md I deployed it with $ helm install k8crdb --set Secure.Enabled=true cockroachdb/cockroachdb…
klabbaparn
  • 157
  • 3
  • 9
0
votes
0 answers

Istio ServiceEntry and VirtualService to redirect to host

The scenario has 2 kubernetes clusters with Istio replicated control planes configured and a forward for .global zone in kube-dns. Requests made from the originating pod must be consistent in the naming in both clusters, with this meaning that the…
carrotcakeslayer
  • 809
  • 2
  • 9
  • 33
0
votes
1 answer

Searching a large string in Database

So I have a table in which one of the columns is used to store data of type string which usually has 10000 characters. When trying to match a particular string it takes a lot of time operationally. Is there any way to reduce it ??
0
votes
1 answer

Where to find the ca.key on kubernetes helm installation on EKS

probably super simple but my lack of experience with both kubernetes and cockroachdb makes it a bit difficult. I have set up a EKS cluster of 2 nodes where I am running 2 replicas of cockroach DB. I have followed the documentation to install…
Michael Guimaraes
  • 333
  • 1
  • 3
  • 20
0
votes
1 answer

How does pattern matching work with ref in Rust?

Just came across this code from here: ... let mut txn = client.transaction()?; loop { let mut sp = txn.savepoint("cockroach_restart")?; match op(&mut sp).and_then(|t| sp.commit().map(|_| t)) { Err(ref err) …
d9ngle
  • 1,303
  • 3
  • 13
  • 30
0
votes
1 answer

What should be the memory usage alert criteria for Cockroachdb running in Kubernetes?

I am using cockroach DB cluster on GKE and I'm monitoring with Prometheus and have imported this Grafana Dashboard However, there are 4 types of RAM usage within the graph(RSS, goallocated,gototal,cgo allocated), therefore I'm not able to decide on…