**Use case**

Currently, `system.replicas` table has `total_replicas` and `active_replicas` columns which are useful to check/alert when some replicas are down. One problem, these columns are numbers. They tell when there is a problem, but you need to further check ZooKeeper or query all the nodes to detect what exact replicas (hosts) are down/inactive/have problems.

**Describe the solution you'd like**

Add a replicas column maybe as a map which would contain the replica name, and it's status. Or, add 2 array columns with `replica_names` and `active_replica_names`

**Alternative**

Something along the line

```sql
select path, value from system.zookeeper where path IN (
    select concat(path, '/', name) from system.zookeeper where path in (select concat(zookeeper_path, '/replicas') from system.replicas)
)
and name = 'is_active'
```
{
    time_t min_unprocessed_insert_time = 0;
    time_t max_processed_insert_time = 0;
    queue.getInsertTimes(min_unprocessed_insert_time, max_processed_insert_time);
    
    
    time_t queue_update_start_time = last_queue_update_start_time.load();
    time_t queue_update_finish_time = last_queue_update_finish_time.load();
    time_t current_time = time(nullptr);
    if (!queue_update_finish_time)
    {
        
        
        return current_time;
    }
    else if (min_unprocessed_insert_time)
    {
        
        return (current_time > min_unprocessed_insert_time) ? (current_time - min_unprocessed_insert_time) : 0;
    }
    else if (queue_update_start_time > queue_update_finish_time)
    {
        
        
        
        return (current_time > queue_update_start_time) ? (current_time - queue_update_start_time) : 0;
    }