Dropping extension does not drop shards on the workers
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
- Dropping distributed tables drops the shards on the worker nodes.
- Dropping extension drops the distributed tables (i.e. see below `NOTICE: drop cascades to table test`). But, in this case the shards remain on the workers.
Also, I want to note that this behaviour exists in v5.0.0-rc.3 release as well.
Steps to re-produce:
``` SQL
postgres=# \d
No relations found.
postgres= CREATE TABLE test(a int);
CREATE TABLE
postgres= SELECT master_create_distributed_table('test', 'a', 'hash');
master_create_distributed_table
---------------------------------
(1 row)
postgres= SELECT master_create_worker_shards('test', '4', '1');
master_create_worker_shards
-----------------------------
(1 row)
postgres=#
postgres= DROP EXTENSION citus;
ERROR: cannot drop extension citus because other objects depend on it
DETAIL: table test depends on extension citus
HINT: Use DROP ... CASCADE to drop the dependent objects too.
postgres= DROP EXTENSION citus CASCADE;
NOTICE: drop cascades to table test
DROP EXTENSION
postgres= \c - - - 9700
You are now connected to database "postgres" as user "onderkalaci" via socket in "/tmp" at port "9700".
postgres= \d
List of relations
Schema | Name | Type | Owner
--------+-------------+-------+-------------
public | test_102008 | table | onderkalaci
public | test_102010 | table | onderkalaci
(2 rows)
```
Contributor guide
Assessment
This issue has not been assessed yet.