From: Daniele Varrazzo Date: Mon, 30 Aug 2021 03:31:32 +0000 (+0200) Subject: Point out in async connection about blocking DNS and solution X-Git-Tag: 3.0.beta1~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a3fa0d6d6a94ceceecdd89bba10c33e3aa87d38;p=thirdparty%2Fpsycopg.git Point out in async connection about blocking DNS and solution --- diff --git a/docs/advanced/async.rst b/docs/advanced/async.rst index 492584fca..4f3e61a09 100644 --- a/docs/advanced/async.rst +++ b/docs/advanced/async.rst @@ -29,6 +29,18 @@ here and there. print(record) +.. warning:: + + `AsyncConnection.connect()` may still block on DNS name resolution. + To avoid that you should `set the hostaddr connection parameter`__. + + The `~psycopg._dns.resolve_hostaddr_async()` is an experimental solution + to help to do that. Feedback about the feature is welcome! + + .. __: https://www.postgresql.org/docs/current/libpq-connect.html + #LIBPQ-PARAMKEYWORDS + + .. index:: with .. _async-with: