citusdata / citusdata/citus

Support undistribute table on foreign Citus tables

Open
#4,946 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

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

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.