Revising the asyncpg ``terminate()`` fix first made in :ticket:`10717`
which improved the resiliency of this call under all circumstances, adding
``asyncio.CancelledError`` to the list of exceptions that are intercepted
as failing for a graceful ``.close()`` which will then proceed to call
``.terminate()``.
Fixes: #11821
Change-Id: Ic5e21cd18cc5517aae372560c52b2b2396c65483
--- /dev/null
+.. change::
+ :tags: bug, postgresql
+ :tickets: 11821
+
+ Revising the asyncpg ``terminate()`` fix first made in :ticket:`10717`
+ which improved the resiliency of this call under all circumstances, adding
+ ``asyncio.CancelledError`` to the list of exceptions that are intercepted
+ as failing for a graceful ``.close()`` which will then proceed to call
+ ``.terminate()``.
await_(self._connection.close(timeout=2))
except (
asyncio.TimeoutError,
+ asyncio.CancelledError,
OSError,
self.dbapi.asyncpg.PostgresError,
):