If a user calls DROP TABLE on a pg_shard-distributed table, the table is dropped but rows referencing it remain in pg_distribution_metadata tables. A solution for this problem was proposed in #49, but we removed it before merging to focus specifically on the DROP EXTENSION issue.
pg_shard should detect DROP TABLE on distributed relations and error out, similar to the error produced when e.g. trying to drop a table on which a foreign key depends. If a CASCADE is supplied, the DROP TABLE should succeed with a warning that the shards themselves will remain on remote machines.
If a user calls
DROP TABLE
on apg_shard
-distributed table, the table is dropped but rows referencing it remain inpg_distribution_metadata
tables. A solution for this problem was proposed in #49, but we removed it before merging to focus specifically on theDROP EXTENSION
issue.pg_shard
should detectDROP TABLE
on distributed relations and error out, similar to the error produced when e.g. trying to drop a table on which a foreign key depends. If aCASCADE
is supplied, theDROP TABLE
should succeed with a warning that the shards themselves will remain on remote machines.