-
Couldn't load subscription status.
- Fork 435
Open
Description
Is it possible to connect to several hosts (one master and replicas) from ConnectionPool (interface like libpq provides)?
I mean the following: https://www.postgresql.org/docs/current/static/libpq-connect.html
# Read sessions postgresql://host1:123,host2:456/somedb?target_session_attrs=any # Read-write sessions postgresql://host1:123,host2:456/somedb?target_session_attrs=read-write I enumerate all postgresql hosts and in target_session_attrs parameter specify read-write if i need master.
Or i should create separate connection pools for master & replicas servers?
How that functionality (switching between hosts depending on target_session_attrs attrs, re-connecting on master switch) can be implemented in asyncpg?
and-semakin
Metadata
Metadata
Assignees
Labels
No labels