Skip to content

Support for multiple hosts in postgresql connection string #4392

@wingc-china

Description

@wingc-china

PostgresSQL supports connecting with multiple hosts in connection string.
https://www.postgresql.org/docs/current/static/libpq-connect.html#libpq-multiple-hosts

The multiple hosts in connection string is like
postgresql+psycopg2://user:password@host1:port1,user:password@host2:port2/dbname
Unfortunately current SQLAlchemy behavior is parsing password@host1:port1,user:password out as password to try connecting.

In fact both libpq and psycopg2(psycopg/psycopg2#602) support multi-host already. We might want to add more code to the engine/url.py to add this support in SQLAlchemy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockerissue that must be resolved asap as it is preventing things from workingbugSomething isn't workingnear-term releaseaddition to the milestone which indicates this should be in a near-term releasepostgresqluse casenot really a feature or a bug; can be support for new DB features or user use cases not anticipated

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions