citusdata / citusdata/citus

Cannot remove coordinator node even when other nodes remain

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

Description

Seems unexpected:
```sql
postgres=# table pg_dist_node;
┌────────┬─────────┬───────────┬──────────┬──────────┬─────────────┬──────────┬──────────┬─────────────┬────────────────┬──────────────────┐
│ nodeid │ groupid │ nodename │ nodeport │ noderack │ hasmetadata │ isactive │ noderole │ nodecluster │ metadatasynced │ shouldhaveshards │
├────────┼─────────┼───────────┼──────────┼──────────┼─────────────┼──────────┼──────────┼─────────────┼────────────────┼──────────────────┤
│ 1 │ 0 │ localhost │ 1300 │ default │ t │ t │ primary │ default │ t │ t │
│ 8 │ 7 │ localhost │ 1302 │ default │ f │ t │ primary │ default │ f │ f │
│ 2 │ 1 │ localhost │ 1301 │ default │ f │ t │ primary │ default │ f │ t │
└────────┴─────────┴───────────┴──────────┴──────────┴─────────────┴──────────┴──────────┴─────────────┴────────────────┴──────────────────┘
(3 rows)

Time: 7.865 ms
postgres=# select master_remove_node('localhost', 1300);
ERROR: cannot remove the last worker node because there are reference tables and it would cause data loss on reference tables
HINT: To proceed, either drop the reference tables or use undistribute_table() function to convert them to local 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.