https://rethinkdb.com/blog/handling-stack-overflow-on-custom-stacks/

https://barrgroup.com/embedded-systems/how-to/prevent-detect-stack-overflow 

etc.
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();
        
        database_catalog.assertDatabaseExists(default_database);
    }
    catch (...)
    {
        tryLogCurrentException(log, "Caught exception while loading metadata");
        throw;
    }
    LOG_DEBUG(log, "Loaded metadata.");