Symptoms: all threads in BackgroundScheduledPool busy, lot of tasks in replication queue, none of the tasks is executing. 

![Screenshot from 2021-04-16 16-21-44_](https://user-images.githubusercontent.com/1549571/115193796-e767d600-a0ec-11eb-887c-5c9c2412e50c.png)

Related to #16895

Possible workarounds (poor options): increasing the background_schedule_pool_size to huge values, or restart server every time when that happens etc. - 

LOG_DEBUG(log, "Freezing part {} snapshot will be placed at {}", part->name, backup_path);
        part->volume->getDisk()->createDirectories(backup_path);
        String backup_part_path = fs::path(backup_path) / relative_data_path / part->relative_path;
        if (auto part_in_memory = asInMemoryPart(part))
            part_in_memory->flushToDisk(fs::path(backup_path) / relative_data_path, part->relative_path, metadata_snapshot);
        else
            localBackup(part->volume->getDisk(), part->getFullRelativePath(), backup_part_path);
        part->volume->getDisk()->removeFileIfExists(fs::path(backup_part_path) / IMergeTreeDataPart::DELETE_ON_DESTROY_MARKER_FILE_NAME);
        part->is_frozen.store(true, std::memory_order_relaxed);
        result.push_back(PartitionCommandResultInfo{
            .partition_id = part->info.partition_id,
            .part_name = part->name,
            .backup_path = fs::path(part->volume->getDisk()->getPath()) / backup_path,
            .part_backup_path = fs::path(part->volume->getDisk()->getPath()) / backup_part_path,
            .backup_name = backup_name,
        });
        ++parts_processed;
    }
    LOG_DEBUG(log, "Freezed {} parts", parts_processed);
    return result;
}
PartitionCommandsResultInfo MergeTreeData::unfreezePartition(
    const ASTPtr & partition,
    const String & backup_name,
    ContextPtr local_context,
    TableLockHolder &)
{
    return unfreezePartitionsByMatcher(getPartitionMatcher(partition, local_context), backup_name, local_context);
}
PartitionCommandsResultInfo MergeTreeData::unfreezeAll(