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. - 

throw Exception("Existing column " + backQuoteIfNeed(col) + " is used in the expression that was "
                        "added to the sorting key. You can add expressions that use only the newly added columns",
                        ErrorCodes::BAD_ARGUMENTS);
                if (new_metadata.columns.getDefaults().count(col))
                    throw Exception("Newly added column " + backQuoteIfNeed(col) + " has a default expression, so adding "
                        "expressions that use it to the sorting key is forbidden",
                        ErrorCodes::BAD_ARGUMENTS);
            }
        }
    }
    if (!new_metadata.secondary_indices.empty())
    {
        std::unordered_set<String> indices_names;
        for (const auto & index : new_metadata.secondary_indices)
        {
            MergeTreeIndexFactory::instance().validate(index, attach);
            if (indices_names.find(index.name) != indices_names.end())
                throw Exception(
                        "Index with name " + backQuote(index.name) + " already exists",
                        ErrorCodes::LOGICAL_ERROR);
            indices_names.insert(index.name);
        }
    }
    if (!new_metadata.projections.empty())
    {
        std::unordered_set<String> projections_names;
        for (const auto & projection : new_metadata.projections)
        {
            MergeTreeProjectionFactory::instance().validate(projection);
            if (projections_names.find(projection.name) != projections_names.end())