EXPLAIN is wrong for inserting into reference tables
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
We have two nodes, 64 shards.
Now we add reference table and look how will we insert record:
```
db=> select create_reference_table('departments');
db=> explain insert into departments (department_id, department_name,location_id) values (290,'Planning', 1700);
QUERY PLAN
-----------------------------------------------------------------------------
Custom Scan (Citus Router) (cost=0.00..0.00 rows=0 width=0)
Task Count: 1
Tasks Shown: All
-> Task
Node: host=192.168.1.100 port=5432 dbname=db
-> Insert on departments_102072 (cost=0.00..0.01 rows=1 width=90)
-> Result (cost=0.00..0.01 rows=1 width=90)
(7 rows)
```
Despite of 'Task Count: 1' and 'Tasks Shown: All' , insert is applied to all 64 shards (as expected).
Contributor guide
Assessment
This issue has not been assessed yet.