by denchick · 2y ago · 0 comments
If I understand correctly what you mean, then this is no longer a problem. You will simply need to use a connection pool, such as Odyssey or PgBouncer. Even SPQR has its own pool of connections for each shard.
I/O or compute constraints are another issue, if your CPU or disc is already saturated you get probably no additional benefit.
But if you wait for something (locks, I/O) the connection/process can't do other things. High latency between app/database and long running transactions can also use up your available processes, even if they don't consume a lot of CPU or I/O or fight for the same locks.
Lock contention is its own problem, but makes the blocking of processes/connections worse.