citusdata / citusdata/citus

Insert queries on tables with foreign keys are not counted in citus_stat_tenants

Open
#6,896 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.