`total_memory_tracker.setOrRaiseHardLimit(...);` in `ConfigReloader` callback (see `Server.cpp`).
if (current_connections > 0)
                current_connections = waitServersToFinish(*servers_to_start_before_tables, config().getInt("shutdown_wait_unfinished", 5));
            if (current_connections)
                LOG_INFO(log, "Closed connections to servers for tables. But {} remain. Probably some tables of other users cannot finish their connections after context shutdown.", current_connections);
            else
                LOG_INFO(log, "Closed connections to servers for tables.");
        }
        /** Explicitly destroy Context. It is more convenient than in destructor of Server, because logger is still available.
          * At this moment, no one could own shared part of Context.
          */
        global_context_ptr = nullptr;
        global_context.reset();
        shared_context.reset();
        LOG_DEBUG(log, "Destroyed global context.");
    });
    
    
    global_context->setCurrentDatabaseNameInGlobalContext(default_database);
    LOG_INFO(log, "Loading metadata from {}", path);
    try
    {
        loadMetadataSystem(*global_context);
        
        global_context->initializeSystemLogs();
        auto & database_catalog = DatabaseCatalog::instance();
        
        attachSystemTablesServer(*database_catalog.getSystemDatabase(), has_zookeeper);
        
        loadMetadata(*global_context, default_database);
        database_catalog.loadDatabases();