citusdata / citusdata/citus

Removing coordinator with citus local tables gives wrong error message

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

Description

```sql
SELECT citus_add_node('localhost', 9701);
SELECT citus_add_node('localhost', 9700, 0);

create table reference_table(a int unique);
SELECT create_reference_table('reference_table');

-- new feature! :)
create table local_table(a int references reference_table(a));

table pg_dist_partition;
┌─────────────────┬────────────┬─────────┬──────────────┬──────────┐
│ logicalrelid │ partmethod │ partkey │ colocationid │ repmodel │
├─────────────────┼────────────┼─────────┼──────────────┼──────────┤
│ reference_table │ n │ │ 1 │ t │
│ local_table │ n │ │ 0 │ c │
└─────────────────┴────────────┴─────────┴──────────────┴──────────┘
(2 rows)

SELECT citus_remove_node('localhost', 9700);
```

ERROR: cannot remove the **last worker node** because there are reference tables and it would cause data loss on reference tables

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.