Cannot remove coordinator node even when other nodes remain
- 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
Assessment
This issue has not been assessed yet.