postgresql.builtin_pool icon indicating copy to clipboard operation
postgresql.builtin_pool copied to clipboard

now one session will only mapping to one backend process

Open digoal opened this issue 7 years ago • 1 comments

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?

digoal avatar May 21 '18 07:05 digoal

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.

knizhnik avatar Aug 15 '18 12:08 knizhnik