]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
integrate connection.terminate() for supporting dialects
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 23 Aug 2022 13:28:06 +0000 (09:28 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 23 Aug 2022 13:48:00 +0000 (09:48 -0400)
commit1c43ad66478905c8d6cf40d9c818fc1ceeb4efbb
treec6f649c73888ca76fd1875f7b233b00d21532997
parent3ffca71b9032a3168c9c946f88eb144b2ec87e64
integrate connection.terminate() for supporting dialects

Integrated support for asyncpg's ``terminate()`` method call for cases
where the connection pool is recycling a possibly timed-out connection,
where a connection is being garbage collected that wasn't gracefully
closed, as well as when the connection has been invalidated. This allows
asyncpg to abandon the connection without waiting for a response that may
incur long timeouts.

Fixes: #8419
Change-Id: Ia575af779d5733b483a72dff3690b8bbbad2bb05
(cherry picked from commit 3b7e621aa728d9b01dbac4150e13ea2ef6af35a3)
doc/build/changelog/unreleased_14/8419.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/asyncpg.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/engine/interfaces.py
lib/sqlalchemy/pool/base.py
test/engine/test_logging.py
test/engine/test_pool.py