citusdata / pg_shard

ATTENTION: pg_shard is superseded by Citus, its more powerful replacement
https://github.com/citusdata/citus
GNU Lesser General Public License v3.0
1.06k stars 63 forks source link

Prevent dropping distributed tables #139

Closed onderkalaci closed 8 years ago

onderkalaci commented 9 years ago

This PR aims to prevent attempts to DROP distributed tables. This prevention will be circumvented if the user includes the CASCADE option in their DROP command, in which case partition row belonging to the distributed table is deleted, a notice is printed and the DROP is allowed to proceed.

Note that only partition metadata is removed. Shard and shard placement metadata are preserved for:

Next step for removing/dropping is already discussed here.

jasonmp85 commented 8 years ago

Closing this so it won't be hanging around indefinitely. I'll shoot you an email about it.