Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Transaction, PG Connection and Async IO #218

Open
corporatepiyush opened this issue Apr 15, 2017 · 2 comments
Open

Transaction, PG Connection and Async IO #218

corporatepiyush opened this issue Apr 15, 2017 · 2 comments

Comments

@corporatepiyush
Copy link

corporatepiyush commented Apr 15, 2017

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 ?

@domdorn
Copy link
Contributor

domdorn commented Apr 15, 2017

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.

@corporatepiyush
Copy link
Author

Cool thanks. Are there any real world benchmark results compared to JDBC driver which I can look at ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants