After such successful queries:

```sql
CREATE DATABASE testlazy ENGINE = Lazy(1);
CREATE TABLE testlazy.`таблица_со_странным_названием` (a UInt64, b UInt64) ENGINE = Log;
```
Server failed to restart with error:
```
<Error> Application: filesystem error: in posix_stat: failed to determine attributes for the specified path: File name too long [/home/avogar/tmp/server/metadata/testlazy/%25D1%2582%25D0%25B0%25D0%25B1%25D0%25BB%25D0%25B8%25D1%2586%25D0%25B0_%25D1%2581%25D0%25BE_%25D1%2581%25D1%2582%25D1%2580%25D0%25B0%25D0%25BD%25D0%25BD%25D1%258B%25D0%25BC_%25D0%25BD%25D0%25B0%25D0%25B7%25D0%25B2%25D0%25B0%25D0%25BD%25D0%25B8%25D0%25B5%25D0%25BC.sql]
```

Found in https://github.com/ClickHouse/ClickHouse/pull/27928
"in file " + table_metadata_path,
        0,
        local_context->getSettingsRef().max_parser_depth);
    applyMetadataChangesToCreateQuery(ast, metadata);
    statement = getObjectDefinitionFromCreateQuery(ast);
    {
        WriteBufferFromFile out(table_metadata_tmp_path, statement.size(), O_WRONLY | O_CREAT | O_EXCL);
        writeString(statement, out);
        out.next();
        if (local_context->getSettingsRef().fsync_metadata)
            out.sync();
        out.close();
    }
    commitAlterTable(table_id, table_metadata_tmp_path, table_metadata_path, statement, local_context);
}
void DatabaseOrdinary::commitAlterTable(const StorageID &, const String & table_metadata_tmp_path, const String & table_metadata_path, const String & , ContextPtr )
{
    try
    {
        
        fs::rename(table_metadata_tmp_path, table_metadata_path);
    }
    catch (...)
    {
        fs::remove(table_metadata_tmp_path);
        throw;
    }
}
}