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.
{
    if (expr.hasArrayJoin())
        throw Exception(key_name + " key cannot contain array joins", ErrorCodes::ILLEGAL_COLUMN);
    try
    {
        expr.assertDeterministic();
    }
    catch (Exception & e)
    {
        e.addMessage(fmt::format("for {} key", key_name));
        throw;
    }
    for (const ColumnWithTypeAndName & element : sample_block)
    {
        const ColumnPtr & column = element.column;
        if (column && (isColumnConst(*column) || column->isDummy()))
            throw Exception(ErrorCodes::ILLEGAL_COLUMN, "{} key cannot contain constants", key_name);
        if (!allow_nullable_key && hasNullable(element.type))
            throw Exception(
                ErrorCodes::ILLEGAL_COLUMN, "{} key contains nullable columns, but merge tree setting `allow_nullable_key` is disabled", key_name);
    }
}
void MergeTreeData::checkProperties(