4 ms·
No. When you start a transaction, you hold onto the particular connection you started it with, and that connection is busy in your connection pool and won't be
by mkozlows 11y ago
No. When you start a transaction, you hold onto the particular connection you started it with, and that connection is busy in your connection pool and won't be assigned to unrelated queries. See for instance: https://github.com/brianc/node-postgres/wiki/Transactions https://github.com/brianc/node-postgres/wiki/Transactions
(If you're just saying "other unrelated queries could happen between opening the transaction and closing it," well, yes, but that's true of any web application, whether it uses threads or events.)
- EGreg 11y agoUsually a thread or an app holds a connection. But here the connection may be shared among many evented handlers!