For some reasons when we delete a MergeTree Part in atomic way something may go wrong - and leave the `delete_tmp_*` folder or it's part on disk. This may lead to a disk space consumption over time.

It's suggested to delete this folders at least at server start-up. Current solution with `clearOldTemporaryDirectories()` doesn't work because this method is called periodically from a thread without any locks or advisory on folders - it may cause the race conditions.
DetachedPartsInfo getDetachedParts() const;
    static void validateDetachedPartName(const String & name);
    void dropDetached(const ASTPtr & partition, bool part, ContextPtr context);
    MutableDataPartsVector tryLoadPartsToAttach(const ASTPtr & partition, bool attach_part,
                                                ContextPtr context, PartsTemporaryRename & renamed_parts);
    
    
    void delayInsertOrThrowIfNeeded(Poco::Event * until, ContextPtr query_context) const;
    
    
    
    
    
    
    
    bool renameTempPartAndAdd(
        MutableDataPartPtr & part,
        MergeTreeTransaction * txn,
        SimpleIncrement * increment = nullptr,
        Transaction * out_transaction = nullptr,
        MergeTreeDeduplicationLog * deduplication_log = nullptr,
        std::string_view deduplication_token = std::string_view());
    
    
    
    DataPartsVector renameTempPartAndReplace(
        MutableDataPartPtr & part, MergeTreeTransaction * txn, SimpleIncrement * increment = nullptr,
        Transaction * out_transaction = nullptr, MergeTreeDeduplicationLog * deduplication_log = nullptr);