Always writing table in to a single node. Percona postgres Citus , Sharding not working
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
Hi Team,
Very good morning, I Hope you doing well.
First up on, Thanks to you, for giving a wonderful cluster solution with table sharing, I have installed the Percona Postgres cluster using Citus in ubuntu 22 servers.
I have installed using the below [doc ](https://www.percona.com/blog/scalable-solutions-with-percona-distribution-for-postgresql-part-2-using-citus/#)
Used 3 nodes, and 192.168.1.101 is coordinator_host,
192.168.1.100 and 192.168.1.1.150 servers are used as nodes , all are used same version even percona postgres cluster and Citus.
Also, I make changes as per the doc in pg_hba.conf and postgresql.conf,
in each server to allow connection from other nodes, and each server is connected with private IP .
My problem is when I do testing like importing data , it is only writes table the 192.168.1.100 server not writing 192.168.1.150 server, Sharding not working as expected, I have tested using below command.
```
SET citus.explain_all_tasks TO on;
EXPLAIN ANALYZE SELECT * FROM events;
```
When I do analyze using analyze command , it is write only in single system , not both, below you can see that out put.
```
testdb=# EXPLAIN ANALYZE SELECT * FROM events;
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------
Custom Scan (Citus Adaptive) (cost=0.00..0.00 rows=100000 width=52) (actual time=38.927..38.928 rows=5 loops=1)
Task Count: 32
Tuple data received from nodes: 290 bytes
Tasks Shown: One of 32
-> Task
Tuple data received from node: 0 bytes
Node: host=192.168.1.100 port=5432 dbname=testdb
-> Seq Scan on events_102040 events (cost=0.00..20.20 rows=1020 width=52) (actual time=0.005..0.006 rows=0 loops=1)
Planning Time: 0.509 ms
Execution Time: 0.032 ms
Planning Time: 1.453 ms
Execution Time: 38.974 ms
(12 rows)
```
Contributor guide
Assessment
This issue has not been assessed yet.