now one session will only mapping to one backend process
HI, now one session will only mapping to one backend process, so when one of the sessoiin attach to the backend process is in idle in transaction mode, so other session's request will waiting which attach to the same process. can we improve the version, so one session don't need to attach a backend, all backend process can share with all sessions?
Hi Sorry, I do not completely understand the question. Backend is able to handle multiple sessions. It is processing statements of one transaction until transaction is finished or client is disconnected. In case of long living transaction, all sessions served by this backend will be blocked. So client should not wait inside transaction (it is also true for normal Postgres, but for built-in connection pool it is much more critical). It is possible to use idle_in_transaction timeout to abort such transactions and prevent blocking of other clients.
I hope I answered your question, if not, please reformulate it.