core: fix max-connections case in pgsql_pool.