Insert queries on tables with foreign keys are not counted in citus_stat_tenants
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
```SQL
CREATE TABLE tbl (a INT UNIQUE);
CREATE TABLE tbl2 (a INT REFERENCES tbl(a));
SELECT create_distributed_table ('tbl', 'a');
SELECT create_distributed_table ('tbl2', 'a');
INSERT INTO tbl VALUES (1);
SELECT tenant_attribute, query_count_in_this_period FROM citus_stat_tenants;
tenant_attribute | query_count_in_this_period
------------------+----------------------------
1 | 1
(1 row)
INSERT INTO tbl2 VALUES (1);
SELECT tenant_attribute, query_count_in_this_period FROM citus_stat_tenants;
tenant_attribute | query_count_in_this_period
------------------+----------------------------
1 | 1
(1 row)
```
Contributor guide
Assessment
This issue has not been assessed yet.