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 run create_distributed_table and connect to coordinator and worker nodes, the table is present in all (with all rows) and with the actual table name (no table_name_shardid).
If I run the following query though:
SELECT
shardid,
node.nodename,
node.nodeport
FROM pg_dist_placement placement
JOIN pg_dist_node node
ON placement.groupid = node.groupid
AND node.noderole = 'primary'::noderole
WHERE shardid = 102056;
I get the shard should only be present in one of the nodes:
102056 "worker1b" 5432
Running select * from citus_get_active_worker_nodes()
on coordinator I get:
"worker2a" 5432
"worker1b" 5432