Ubuntu 20.10 has glibc 2.32 and ClickHouse built in a plain way has two symbols marked GLIBC_2.32,
namely
 
```
 ilejn@ilejn-Latitude-5400:~/projects/ClickHouse/build$ objdump -T ./programs/clickhouse | grep GLIBC_2.32
 0000000000000000      DF *UND*  0000000000000000  GLIBC_2.32  pthread_sigmask
 0000000000000000      DF *UND*  0000000000000000  GLIBC_2.32  pthread_getattr_np
```
{
    if (!supportsRenameat2())
        return false;
    if (old_path.empty() || new_path.empty())
        throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot rename {} to {}: path is empty", old_path, new_path);
    
    
    
    if (0 == syscall(__NR_renameat2, AT_FDCWD, old_path.c_str(), AT_FDCWD, new_path.c_str(), flags))
        return true;
    
    
    
    
    if (errno == EINVAL)
        return false;
    
    
    if (errno == ENOSYS)
        return false;
    if (errno == EEXIST)
        throwFromErrno(fmt::format("Cannot rename {} to {} because the second path already exists", old_path, new_path), ErrorCodes::ATOMIC_RENAME_FAIL);
    if (errno == ENOENT)
        throwFromErrno(fmt::format("Paths cannot be exchanged because {} or {} does not exist", old_path, new_path), ErrorCodes::ATOMIC_RENAME_FAIL);
    throwFromErrnoWithPath(fmt::format("Cannot rename {} to {}", old_path, new_path), new_path, ErrorCodes::SYSTEM_ERROR);
}
bool supportsRenameat2()