def database_config_section_to_connection_pool_set(self, section_name, pool_name):
        """Read the given section name from the private config parser and create a corresponding connection pool.
        
        This pool does not try to connect to the database immediately (with minconn=0)
        """
        if not pool_name:
            pool_name = section_name
        if not self.cp.has_section(section_name) :
            raise ConfigParser.NoSectionError(section_name)
        
        hosts = self.cp.get_default(section_name, 'host', 'localhost').split(',')
        port = int( self.cp.get_default(section_name, 'port', 5432) )
        dbname = self.cp.get_default(section_name, 'dbname', 'postgres')
        common_dsn = ' '.join( '{0[0]}={0[1]}'.format(item) for item in self.cp.items(section_name) if item[0].lower() not in ('host','dsn','encoding','statement_timeout') )
        host_dsn_list = [ ( host, 'host={0} {1}'.format(host.strip(), common_dsn) ) for host in hosts if host.strip() ]
        if not host_dsn_list :
            raise ConfigParser.NoOptionError('host', section_name)
 
        try :
            encoding=self.cp.get(section_name, 'encoding')
        except ConfigParser.NoOptionError :
            encoding=None
        try :
            statement_timeout=self.cp.get(section_name, 'statement_timeout')
            statement_timeout=int(statement_timeout)
        except ConfigParser.NoOptionError :
            statement_timeout=None
        except ValueError :
            statement_timeout=None
            self.logger.warning("Database configuration section {0} contains option 'statement_timeout' that should be numeric, but the specified value is '{1}', skipping this option.".format(section_name, statement_timeout) )

        for i, ( host, dsn ) in enumerate( host_dsn_list ):
            pool_name_i = '{0}_{1}'.format(pool_name, i) if len(host_dsn_list) > 1 else pool_name
            connection_pool = PersistentConnectionPoolWithContext(pool_name_i, 
                                                                  minconn=0, 
                                                                  maxconn=5, 
                                                                  host=host, 
                                                                  port=port, 
                                                                  dbname=dbname, 
                                                                  encoding=encoding, 
                                                                  statement_timeout=statement_timeout, 
                                                                  dsn=dsn)
            self.logger.debug('Created a connection pool to {0} database with dsn: {1}'.format(pool_name_i, dsn))
            atexit.register(self._atexit_close_pool, connection_pool)
            yield connection_pool
Read the given section name from the private config parser and create a corresponding connection pool.
        
        This pool does not try to connect to the database immediately (with minconn=0)
        
recipes/Python/577072_Global_database_configuraticontext_aware/recipe-577072.py