You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "leo-mazzone (via GitHub)" <gi...@apache.org> on 2025/04/07 11:54:49 UTC
[I] Pooling and conditional rollbacks [arrow-adbc]
leo-mazzone opened a new issue, #2673:
URL: https://github.com/apache/arrow-adbc/issues/2673
### What feature or improvement would you like to see?
I am trying to apply [your Python recipe here](https://arrow.apache.org/adbc/17/python/recipe/postgresql.html#connection-pooling-with-sqlalchemy) for implementing connection pooling via SQLAlchemy. When a connection gets returned to the pool the default behaviour is (and it feels like a good default), to call the `.rollback()` method on the DBAPI connection object. Most of the time there is nothing in the transaction, because I have either already committed, or I'm just reading.
Psycopg's implementation of rollback checks the transaction status. If it is empty (or "idle"), it doesn't actually execute the ROLLBACK command. From what I can see, ADBC does not do this.
So every time I'm done using a connection, I get this warning
```
WARNING: there is no transaction in progress
```
This essentially means that my Postgres logs are being overwhelmed by that warning.
Is there a way of implementing something similar to Psycopg, in terms of checking the current transaction status? I could even pass a custom function to the SQLAlchemy pool to tell it how to deal with connection resets. My main problem is that I can't work out how to access the transaction status from the ADBC driver.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Pooling and conditional rollbacks [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm closed issue #2673: Pooling and conditional rollbacks
URL: https://github.com/apache/arrow-adbc/issues/2673
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Pooling and conditional rollbacks [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #2673:
URL: https://github.com/apache/arrow-adbc/issues/2673#issuecomment-2785032771
@leo-mazzone see https://github.com/apache/arrow-adbc/pull/2685. If you scroll to the bottom of this action run, you can download wheels for your platform in case you'd like to give it a spin: https://github.com/apache/arrow-adbc/actions/runs/14322748029?pr=2685
Note that `commit` still appears to generate a warning in some cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Pooling and conditional rollbacks [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm closed issue #2673: Pooling and conditional rollbacks
URL: https://github.com/apache/arrow-adbc/issues/2673
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Pooling and conditional rollbacks [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #2673:
URL: https://github.com/apache/arrow-adbc/issues/2673#issuecomment-2783117476
Glad to see the recipe is helpful. I'll try to play around with this and take a look at exposing a way to get the current status. (Honestly maybe we should do the check ourselves, save a network round trip...)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org