468 questions
6votes
1answer
87views
How does CockroachDB handle partitions between the leaseholder and Raft leader of a range?
While CockroachDB attempts to ensure that the leaseholder and Raft leader are the same node, this is not enforced (well aside from the introduction of leader leases). In the event that the Raft leader ...
-1votes
2answers
98views
How to sum up numbers in JSONB key-values in PostgreSQL (CockroachDB)?
I have a table with rows with a JSONB in this form (YAML here for readability): { foo: 500, bar: 12 } { foo: 500, bar: 18, zoo: 5 } ... There can be arbitrary keys in the objects, but always ...
0votes
0answers
70views
Calcite SQL Join Query Fails with "Multiple entries with same key" Error
I'm trying to execute a SQL join query across two different databases (CockroachDB and H2) using Apache Calcite. The query works fine when executed directly on the respective databases, but when I try ...
1vote
0answers
86views
Why does adding a small (or even zero) `OFFSET` in Cockroach slow down a query so much?
I have a query with a LIMIT on the end, which looks something like this: SELECT -- column names omitted FROM foo INNER JOIN bar ON foo.id = bar.foo_id ORDER BY foo.timestamp DESC WHERE bar....
2votes
0answers
82views
Why would npgsql be throwing two different errors for timing out?
I have an ASP.NET Core Web API using EF Core. I'm trying to implement timeout middleware as shown here: public async Task InvokeAsync(HttpContext context, RequestDelegate next) { int ...
0votes
1answer
39views
How to sort/filter the result of `SHOW INDEXES` in CockroachDB?
In Cockroach, you can get a list of all indexes in a database with SHOW INDEXES FROM DATABASE db_name; As far as I can tell, this is the only way to do so -- there's no table like information_schema.&...
0votes
1answer
17views
What does rows processed mean in the cockroachDB UI/console?
Here is a screenshot of the DB console for a cockroachDB cluster, what does 7.5 writes mean in this case? This application is a Spring Boot application and is doing batched writes. Is 7.5 the size of ...
0votes
2answers
44views
Implement of triggers postgresql to cockroachdb
I'm trying to migrate a database written in PostgreSQL to cockroachDB I want to know if there's a way to implement the trigger in SQL in cockroachDB. I know cocroachDB not supported triggers but I ...
2votes
4answers
138views
How does client handle failures in RAFT-replicated datastores?
Consider a database like cockroachDB that uses RAFT protocol for replicating data to a replica group owning a partition of the data. How does a client handle a request that fails in such DBs? Because, ...
0votes
1answer
59views
Cockroachdb pg_connect() [duplicate]
Fatal error: Uncaught Error: Call to undefined function pg_connect() I'm using php8 and apache2.4 server, cockroachdb as cloud database. now I have uncommented these already: extension=pdo_pgsql, ...
0votes
0answers
95views
Getting issue in Cockroach DB cluster
We have setup three node Cockroach-DB cluster(version: 22.2.14) on GKE kubernetes cluster on GCP using Helm. Helm chart version is 6.0.3. Suddenly, we’re getting below error on Cockroach-DB pod’s. ...
1vote
1answer
110views
Cockroachdb transactions running in readonly mode with typeorm mifgrations
This is my dataSource.ts file import { DataSource } from 'typeorm'; import { Step } from './src/recipe/entity/step.entity'; import { Chemical } from './src/recipe/entity/chemical.entity'; import { ...
0votes
1answer
61views
operator classes are only allowed for the last column of an inverted index
Since I migrated my Django application from MariaDb to CockraochDB which is basically Postgres Syntax I get the following error, I really do not understand, I also do not find any referenced on the ...
0votes
1answer
48views
how to add array data in single field in CockroachDB
Here is the payload and need to insert payload.b data individually payload = { a:test1, b: [1,2,3,4] } expecting out in table db test1 1 test1 2 test1 3 test1 4 i tried using unset query shown below ...
-1votes
1answer
75views
CockroachDB configuration on NUMA enabled processors
Old CockroachDB documentation v2.1 has a cryptic description of CPUs with NUMA (Non-uniform Memory Access): To add more processing power (up to 16 vCPUs), adding more vCPUs is better than adding more ...