citusdata / citusdata/citus

partitioned foreign tables are not created automatically

Open
#1,570 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

- Created a partitioned table pt(a int, b int, c int);
- Distributed pt on ‘a’ using create_distributed_table
- Create a table pt_a, partition of pt for some values → pt_a is automatically distributed
- Create a cstore table pt_c, partition of pt for some other values → pt_c is created but not distributed
Expect
- pt_c is either distributed or an error is throw

```sql
create table pt(a int, b int, c int) partition by range (a);
select create_distributed_table('pt', 'a');
create table pt_a partition of pt for values from (1) to (100);
-- verify table is distributed and shards are created
create foreign table pt_c partition of pt for
values from (100) to (1000) server cstore_server options (compression 'pglz');
-- pt_c is not distributed nor shards are created
select create_distributed_table('pt_c', 'a');
-- pt_c is now distributed
```

We should intervene and throw an error when a partitioned foreign table is created on distributed partitioned table until we support this.

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.