You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible to drop a data type that is used as a distribution key by citus.
However, as the datatype is still stored by citus, querying the corresponding table and citus_table fails,
See the logs below.
A possible solution is to avoid dropping a data when it is used as a distribution key. An alternative would be propagating the drop operation to citus internal tables (need further analysis)
ebru=# create type my_type AS (d1 int, d2 int);
CREATE TYPE
ebru=# create table test_table(data my_type, id int);
CREATE TABLE
ebru=# select create_distributed_table('test_table', 'data');
create_distributed_table
--------------------------
(1 row)
ebru=#
ebru=# drop type my_type ;
ERROR: cannot drop type my_type because other objects depend on it
DETAIL: column data of table test_table depends on type my_type
HINT: Use DROP ... CASCADE to drop the dependent objects too.
ebru=# drop type my_type cascade;
NOTICE: drop cascades to column data of table test_table
DROP TYPE
ebru=#
ebru=# select * from test_table ;
ERROR: cache lookup failed for type 17275
ebru=# select * from citus_tables ;
ERROR: cache lookup failed for type 17275
ebru=#
ebru=# select * from pg_dist_colocation;
colocationid | shardcount | replicationfactor | distributioncolumntype | distributioncolumncollation
--------------+------------+-------------------+------------------------+-----------------------------
1 | 32 | 1 | 17275 | 0
2 | 32 | 1 | 23 | 0
(2 rows)
The text was updated successfully, but these errors were encountered:
It is possible to drop a data type that is used as a distribution key by citus.
However, as the datatype is still stored by citus, querying the corresponding table and citus_table fails,
See the logs below.
A possible solution is to avoid dropping a data when it is used as a distribution key. An alternative would be propagating the drop operation to citus internal tables (need further analysis)
The text was updated successfully, but these errors were encountered: