Transaction, PG Connection and Async IO
corporatepiyush opened this issue · 2 comments
Does transaction requires a given Postgres connection to be reserved exclusively until commit command or it can be used in another transaction ?
Assuming that someone is using this driver for web application for which all HTTP requests needs transaction, if Postgres connection need to reserved exclusively, then there would be 1 Postgres connection per HTTP request. I wonder How much benefit one might achieve by using this async (non-blocking) driver instead of sync (blocking) jdbc driver ?
If your full request is running in a transaction, than you need as many connections as you want to serve requests concurrently. You still have the benefits of non-blocking, although your application will only be as responsive as your database backend can be.
Cool thanks. Are there any real world benchmark results compared to JDBC driver which I can look at ?