Relative Content

Tag Archive for gopgx

How does `jackc/pgx` works with multiply hosts

I have a PostreSQL cluster where I have a master and a slave. I have seen that pgx/pgxpoll supports simultaneous connection to multiple hosts, but I do not understand how requests will be executed then. Can pgx understand where the master is? (I didn’t find that he could do that.) And will pgx work at all if I have a master and a slave, and only readonly requests can be executed on the slave.

How does `jackc/pgx` works with multiply hosts

I have a PostreSQL cluster where I have a master and a slave. I have seen that pgx/pgxpoll supports simultaneous connection to multiple hosts, but I do not understand how requests will be executed then. Can pgx understand where the master is? (I didn’t find that he could do that.) And will pgx work at all if I have a master and a slave, and only readonly requests can be executed on the slave.