-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple cursors on single transaction not supported. #65
Comments
Same behavior when using cursors without transactions but with limited pool size. When second cursor was created on same connection as first one reading from first cursor hangs, but first's cursor handler receives rows from second cursor. |
Hi @McAronDev That's really interesting, I haven't thought about that use case when implementing cursors, so I would have to give it some more thought. I'm currently very hung up with work, so it might be a little while before I can find the time to look closer. |
You can't run more than one query simultaneously in a transaction. There is a bug here, but FYI, your first example can't ever really be done. |
Yes. But they should be queued. Since this lib does not provide separate cursor creation and it's fetching methods, i guess we should be able to reuse transaction while cursor is "paused" and until that all queries should be queued. So in my example, there should be the following behavior:
... Following fetching order is not easy predictable=) but we should receive all rows from both cursors. |
Sure, that makes sense. |
This code returns unexpected console output:
is it possible to support simultaneous reading for multiple cursors in single transaction?
The text was updated successfully, but these errors were encountered: