Function FetchUserForAuthV1 Fails Under Concurrency, While FetchUserForAuth Performs Well
I have two functions with similar functionality that I use to test concurrency. However, FetchUserForAuthV1 starts throwing errors with fewer requests compared to FetchUserForAuth. I’m sharing code snippets for both functions and would appreciate any suggestions for improvement.
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.
How to efficiently scan large number of rows in a streaming fashion with pgx
I’m working with the pgx
library in Go, and I need to scan a large number of rows from a PostgreSQL database in a streaming fashion. Loading all records into memory at once isn’t feasible due to the high memory consumption.