Questions tagged [citus]

Citus is a distributed database that lets you run SQL queries over very large data sets.

Citus is a distributed database that lets you run SQL queries over very large data sets. https://github.com/citusdata/citus

131 questions
1
vote
1 answer

Organize shards with citus data when tenant_id of a record is updated

I want to use citus data to shard my postgres database. before jumping into it i want to fully understand its behaviour in different scenarios. Although the docs explain most of the cases. I want to know how would I go about moving data to a…
Aitizazk
  • 332
  • 1
  • 4
  • 16
1
vote
1 answer

Postgres Cluster (citus): Range Query on nested jsonb column

I am using postgres 9.5.4 configured as cluster using citus 5.2 The table has been sharded using below commands. SELECT master_create_distributed_table('mytest', 'id', 'hash'); SELECT master_create_worker_shards('mytest', 16, 1); From below sample…
Carbonrock
  • 457
  • 2
  • 15
1
vote
1 answer

Is there workaround for citus unsupported feature?

For the query: SELECT cu.id id, cu.email email, SUM(case when(rt.type = 'credit' and ( re.type = 'account_refilling' OR re.type = 'site_publishing' OR re.type = 'tariff_buying' )) then rt.amount else 0 end ) transactions_sum FROM…
Eugen Konkov
  • 22,193
  • 17
  • 108
  • 158
1
vote
1 answer

In Citus, how do I lock a distributed table during a COPY?

Citus does not support multi-statement transactions for data modification commands, making it impossible to use the LOCK command for preventing concurrent access during data migrations. Is there any way to lock access to a table during an initial…
Eugen Konkov
  • 22,193
  • 17
  • 108
  • 158
1
vote
2 answers

Does Citus expose the hash function used to prune shards?

This document has a good description how to prepare range-partitioned data for insertion into a target shard. If I knew the exact hash function, I could similarly prepare data for insertion into hash-distributed tables. Such a function is hinted at…
Eugen Konkov
  • 22,193
  • 17
  • 108
  • 158
1
vote
1 answer

What is the fastest way to load data into a new CitusDB instance?

I'm following the instructions on Scaling Out Data Ingestion, with this command: find . -type f | xargs -n 1 -P 320 sh -c 'echo $0 `copy_to_distributed_table -C $0 table_name`' My cluster has a master and eight workers, each with two SSDs. The…
Patrick
  • 261
  • 3
  • 16
1
vote
2 answers

How do I COPY to a cstore_fdw table in Citus?

I have configured cstore_fdw successfully on our CitusDB installation running on an Ubuntu server in AWS. I tried to install the same on one of our client's servers running CentOS 6.5. I could install it but cannot execute COPY commands. Is there…
sajith.vim
  • 87
  • 6
1
vote
0 answers

Data miss match in citusDB with jdbc driver

i am try to insert data into citusDB using same code as postgresql (java JDBC connection). Insertion get success and display all the values in my select query(in java code). But i can't able to list that rows in citusDB postgresql console. And the…
Arun M R Nair
  • 653
  • 7
  • 30
1
vote
1 answer

Node error in citusdb

I am getting a node error when tiring to create a shard. SELECT * from master_create_empty_shard('customer_reviews'); Error: could only find 0 of 2 possible nodes error in citusdb same error was getting for the following also. \STAGE…
Arun M R Nair
  • 653
  • 7
  • 30
1
vote
4 answers

citusdb ERROR: ERROR: cannot execute PREPARE for a distributed query plan

I'm just did the citusdb tutorial. And local using "psql" works fine. But when I try do the same query using native postgres jdbc I get the error: ERROR: ERROR: cannot execute PREPARE for a distributed query plan Query = SELECT count(*) FROM…
Mantovani
  • 500
  • 2
  • 7
  • 18
1
vote
2 answers

citusdb: psql commands not working

I am trying for the first time citusdb, and in the download page, they put a getting started guide, so I am following it. First, I am trying this on my local computer, and with the sample data on the third point of the getting started guide…
eLRuLL
  • 18,488
  • 9
  • 73
  • 99
0
votes
0 answers

Citus Sharding balance info

I configured Citus cluster with 3 nodes, and created a few tabled and used function "create reference table". in this case able to get data (read) from other available nodes. But when one of the node got down unable to insert and unable to create…
Vijay
  • 1
  • 1
0
votes
1 answer

Problems with EF Migrations to Postgres database using Citus

I am using EFCore migrations to alter a postgres db with the Citus extension. I am trying the following steps with my migration: Create the table Call SELECT create_distributed_table etc. Create a second table Add a foreign key from the second…
Gary F
  • 360
  • 3
  • 12
0
votes
1 answer

Citus distributed table in all worker nodes

I'm trying out citus (docker-compose based on tutorial, 2 worker nodes). If I create a table and don't execute create_distributed_table the table is only created in the coordinator which seems to be according to the documentation, however, once I…
0
votes
0 answers

How to update entity by two fields?

Maybe some one know. I want to use citusdb and I try to rewrite doctrine updates. If I use standard update for entity For example $order = $repository->find(1); $human->setComment("test"); $entityManager->flush(); This code create query Updates…
David
  • 3
  • 3
1 2 3
8 9