summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorThomas Munro2025-03-19 03:56:19 +0000
committerThomas Munro2025-03-19 03:56:19 +0000
commitd7e40845f923ed5091b334b1018a547e39846415 (patch)
tree5777e50da5ff5bda8b99b14e2f80558ff5d3a4c9 /config
parent434dbf6907ec8fafa6862a0f00385f293e63ac0e (diff)
oauth: Disallow synchronous DNS in libcurl
There is concern that a blocking DNS lookup in libpq could stall a backend process (say, via FDW). Since there's currently no strong evidence that synchronous DNS is a popular option, disallow it entirely rather than warning at configure time. We can revisit if anyone complains. Per query from Andres Freund. Author: Jacob Champion <[email protected]> Discussion: https://postgr.es/m/p4bd7mn6dxr2zdak74abocyltpfdxif4pxqzixqpxpetjwt34h%40qc6jgfmoddvq
Diffstat (limited to 'config')
-rw-r--r--config/programs.m410
1 files changed, 5 insertions, 5 deletions
diff --git a/config/programs.m4 b/config/programs.m4
index 061b13376ac..0a07feb37cc 100644
--- a/config/programs.m4
+++ b/config/programs.m4
@@ -316,7 +316,7 @@ AC_DEFUN([PGAC_CHECK_LIBCURL],
[Define to 1 if curl_global_init() is guaranteed to be thread-safe.])
fi
- # Warn if a thread-friendly DNS resolver isn't built.
+ # Fail if a thread-friendly DNS resolver isn't built.
AC_CACHE_CHECK([for curl support for asynchronous DNS], [pgac_cv__libcurl_async_dns],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([
#include <curl/curl.h>
@@ -332,10 +332,10 @@ AC_DEFUN([PGAC_CHECK_LIBCURL],
[pgac_cv__libcurl_async_dns=yes],
[pgac_cv__libcurl_async_dns=no],
[pgac_cv__libcurl_async_dns=unknown])])
- if test x"$pgac_cv__libcurl_async_dns" != xyes ; then
- AC_MSG_WARN([
+ if test x"$pgac_cv__libcurl_async_dns" = xno ; then
+ AC_MSG_ERROR([
*** The installed version of libcurl does not support asynchronous DNS
-*** lookups. Connection timeouts will not be honored during DNS resolution,
-*** which may lead to hangs in client programs.])
+*** lookups. Rebuild libcurl with the AsynchDNS feature enabled in order
+*** to use it with libpq.])
fi
])# PGAC_CHECK_LIBCURL