Support undistribute table on foreign Citus tables
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
We can distribute foreign tables, but not undistribute:
```sql
\d test_eu
Foreign table "public.test_eu"
┌────────┬────────┬───────────┬──────────┬────────────────────────────────────────────┬─────────────┐
│ Column │ Type │ Collation │ Nullable │ Default │ FDW options │
├────────┼────────┼───────────┼──────────┼────────────────────────────────────────────┼─────────────┤
│ region │ text │ │ │ │ │
│ key │ text │ │ │ │ │
│ value │ bigint │ │ not null │ nextval('public.test_value_seq'::regclass) │ │
└────────┴────────┴───────────┴──────────┴────────────────────────────────────────────┴─────────────┘
Server: eu_server
FDW options: (schema_name 'eu', table_name 'test')
-- works fine
select citus_add_local_table_to_metadata('test_eu');
-- fails
select undistribute_table('test_eu');
ERROR: cannot complete operation because it is a foreign table
```
Contributor guide
Assessment
This issue has not been assessed yet.