Search code examples
clickhouse

Reclaim disk space after table drop


Dropping a table that uses hundreds of GBs does not free the disk size it uses immediately.

Is there any way to force Clickhouse to free the disk immediately?


Solution

  • Are you asking about database Atomic tables?

    https://kb.altinity.com/engines/altinity-kb-atomic-database-engine/

    database_atomic_delay_before_drop_table_sec=1

    DROP TABLE t SYNC;

    or SET database_atomic_wait_for_drop_and_detach_synchronously = 1