v.21.1New Features
Introduce DETACH TABLE/VIEW ... PERMANENTLY Syntax in ClickHouse
Introduce DETACH TABLE/VIEW ... PERMANENTLY syntax, so that after restarting the table does not reappear back automatically on restart (only by explicit request). The table can still be attached back using the short syntax ATTACH TABLE. Implements #5555. Fixes #13850. #17642 (filimonov).Why it matters
This feature addresses the need to temporarily remove tables or views from ClickHouse without deleting them, ensuring they remain detached even after a server restart. This prevents unwanted automatic reattachment, giving users greater control over table management and lifecycle.How to use it
Use the syntaxDETACH TABLE table_name PERMANENTLY or DETACH VIEW view_name PERMANENTLY to detach a table or view permanently. To reattach it later, use the short syntax ATTACH TABLE table_name.