]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
asyncpg: shield connection close in terminate to avoid connection leak
authorFederico Caselli <cfederico87@gmail.com>
Fri, 17 Jan 2025 20:16:51 +0000 (21:16 +0100)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 20 Jan 2025 18:06:08 +0000 (13:06 -0500)
commit9eb87f47aeb591fd9d354bd9b3d2918d561e6011
tree5be9f2662f075cd9e64b87a03130fa1ff57d7b4a
parent0c6ab45e49252167ac139c5836f0bd02b5b06b6e
asyncpg: shield connection close in terminate to avoid connection leak

Added an additional ``shield()`` call within the connection terminate
process of the asyncpg driver, to mitigate an issue where terminate would
be prevented from completing under the anyio concurrency library.

Fixes #12077
Closes: #12076
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12076
Pull-request-sha: 6ae261ea7668f4c850874666efec6fef658b08c0

Change-Id: Iaec63d02b620201dc60ffdad76ba9d61d427cac1
(cherry picked from commit 2f6ca6554ddd725849dd6b2d32bf495391087bec)
doc/build/changelog/unreleased_20/12077.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/asyncpg.py