summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/pypostgresql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-05-14 13:59:04 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2015-05-14 13:59:04 -0400
commit4a0e51e7d2f334238d9eae6e697fed78ee54f7c2 (patch)
tree99b989a1f05f6c12f94dc672a7916410712f8a4a /lib/sqlalchemy/dialects/postgresql/pypostgresql.py
parenteb1bb84fbc10c801c7269a3d38c9e0235327857e (diff)
downloadsqlalchemy-4a0e51e7d2f334238d9eae6e697fed78ee54f7c2.tar.gz
- Fixed bug where in the case that a pool checkout event handler is used
and the database can no longer be connected towards, that the checkout handler failure is caught, the attempt to re-acquire the connection also raises an exception, but the underlying connection record is not immediately re-checked in before the exception is propagated outwards, having the effect that the checked-out record does not close itself until the stack trace it's associated with is garbage collected, preventing that record from being used for a new checkout until we leave the scope of the stack trace. This can lead to confusion in the specific case of when the number of current stack traces in memory exceeds the number of connections the pool can return, as the pool will instead begin to raise errors about no more checkouts available, rather than attempting a connection again. The fix applies a checkin of the record before re-raising. fixes #3419
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/pypostgresql.py')
0 files changed, 0 insertions, 0 deletions