Skip to content

[BUG]: Cannot use pgbouncer / connection pooling #548

@discostur

Description

@discostur

Describe the bug

  • if you try to use pgbouncer for connection pooling with postgresql you get a connection error on the migration job
Caused by:                                                                                                                                                                                                                                                                                        
PG::ConnectionBad: connection to server at "10.1.0.37", port 25061 failed: FATAL:  no such database: postgres (PG::ConnectionBad)                                                                                                                                                                 
/usr/local/bundle/gems/pg-1.5.9/lib/pg/connection.rb:709:in 'PG::Connection#async_connect_or_reset'                                                                                                                                                                                               
/usr/local/bundle/gems/pg-1.5.9/lib/pg/connection.rb:844:in 'PG::Connection.connect_to_hosts'                                                                                                                                                                                                     
/usr/local/bundle/gems/pg-1.5.9/lib/pg/connection.rb:772:in 'PG::Connection.new'                                                                                                                                                                                                                  
/usr/local/bundle/gems/pg-1.5.9/lib/pg.rb:63:in 'PG.connect'     

The lago migration job seems to make a database connection test at the beginning towards the database with the name "postgres". Since the postgres connection pool is "tailored" against the lago db (which should be different to default postgres db) the conneciton check fails because the database cannot be reached.

Regards,
Kilian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions