Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1whqMK-000S2e-05 for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2026 15:08:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1whqLJ-00DSM1-0o for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2026 15:07:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1whqLI-00DSLt-2m for pgsql-hackers@lists.postgresql.org; Thu, 09 Jul 2026 15:07:13 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1whqLG-00000000Kpq-029b for pgsql-hackers@lists.postgresql.org; Thu, 09 Jul 2026 15:07:12 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 630AB634D08 for ; Thu, 09 Jul 2026 17:07:06 +0200 (CEST) Received: from s899.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id 4EBD3634238; Thu, 09 Jul 2026 17:07:06 +0200 (CEST) Received: from localhost (unknown [172.22.191.5]) by s899.loopia.se (Postfix) with ESMTP id 4AED72C8BA59; Thu, 09 Jul 2026 17:07:06 +0200 (CEST) X-Virus-Scanned: amavis at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s474.loopia.se (amavis); dkim=pass (2048-bit key) header.d=yesql.se Received: from s979.loopia.se ([172.22.191.5]) by localhost (s474.loopia.se [172.22.190.14]) (amavis, port 10024) with UTF8LMTP id 9Q3bm_bzphN3; Thu, 9 Jul 2026 17:07:05 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.236 Received: from smtpclient.apple (customer-89-255-232-236.stosn.net [89.255.232.236]) (Authenticated sender: daniel@yesql.se) by s979.loopia.se (Postfix) with ESMTPSA id A754A10BC40B; Thu, 09 Jul 2026 17:07:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1783609625; bh=3OsEbHE1uuvJn1oJ0aA6mgmd8JvIrOygaebkFvH3GK8=; h=From:Subject:Date:In-Reply-To:Cc:To:References; b=Jo0BMSd4JLwK3pHiM67xzIf8iAqg0/iavrT0QxC5FrcuH2Uva1DTzukUygS0pLmlP AWXApBXnj7xmoe00HrgbbcmyLPDCDubCK/RR03QgxinMebxrpUuBOm4FVNqhEf4kI5 kwf+kuIpPHIqjHv0opIh31itYdU3S3rfL4sTWAt1YpXRLXeplAsXE6L+KCjK6jDaqJ tC+f+8XjSSu/nrLFIYrL9DHjIIjDw487MclbMAojuShCBi+7pV9HYD2TPLR4yZ3Xcu AOCW+rRreHh8uO35IxNDrk4KABw46SgthS/23Y5xx76fY3lrMioJA2ehEBd6zbpxIL MakN73hX44DxA== From: Daniel Gustafsson Message-Id: <6A9E7815-BD5A-4C31-A515-48159823406B@yesql.se> Content-Type: multipart/mixed; boundary="Apple-Mail=_BE6B4CE5-1D98-463D-B890-EBC6235D90A8" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.12\)) Subject: Re: libpq: Process buffered SSL read bytes to support records >8kB on async API Date: Thu, 9 Jul 2026 17:06:55 +0200 In-Reply-To: Cc: solai v , Jacob Champion , Mark Dilger , Andres Freund , Lars Kanis , PostgreSQL Hackers , Merlin Moncure To: Heikki Linnakangas References: <2039ac58-d3e0-434b-ac1a-2a987f3b4cb1@greiz-reinsdorf.de> <57d1e8b1-d016-4cea-9b60-63cbdb40eb81@iki.fi> <990a4710-fed1-411a-aba4-ddc25825ee48@iki.fi> X-Mailer: Apple Mail (2.3776.700.51.11.12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_BE6B4CE5-1D98-463D-B890-EBC6235D90A8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 7 Jul 2026, at 17:58, Heikki Linnakangas wrote: > Committed and backpatched to all supported versions. Thanks everyone! Sorry for coming to this thread late. When compiling against a local = LibreSSL on macOS I get an error on INT_MAX missing: ../src/interfaces/libpq/fe-secure-openssl.c:253:22: error: use of = undeclared identifier 'INT_MAX' else if (pending =3D=3D INT_MAX) ^ 1 error generated. AFAICS it's because openssl/conf.h includes openssl/ossl_typ.h which in = turn includes but the LibreSSL counterpart does not. That being = said, it clearly works in the buildfarm where we have LibreSSL animals on OpenBSD = so it must get pulled in indirectly from somewhere else there. This might be isolated to macOS builds, but I don't have other systems with LibreSSL = handy so not sure. My LibreSSL installation is a libressl_portable locally = compiled which further may explain differences? Any objections to the attached to make compilation pass when building = against LibreSSL on macOS (and possibly elsewhere)? -- Daniel Gustafsson --Apple-Mail=_BE6B4CE5-1D98-463D-B890-EBC6235D90A8 Content-Disposition: attachment; filename=0001-ssl-Include-limits.h-to-get-INT_MAX-when-using-Libre.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-ssl-Include-limits.h-to-get-INT_MAX-when-using-Libre.patch" Content-Transfer-Encoding: quoted-printable =46rom=20731f58640688005edfaf981b446ae1392e1996ba=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Daniel=20Gustafsson=20= =0ADate:=20Thu,=209=20Jul=202026=2017:00:46=20= +0200=0ASubject:=20[PATCH]=20ssl:=20Include=20limits.h=20to=20get=20= INT_MAX=20when=20using=20LibreSSL=0A=0AWhen=20compiling=20against=20= OpenSSL,=20the=20=20header=20is=20indirectly=0Aincluded=20via=20= openssl/ossl_typ.h=20from=20openssl/conf.h,=20but=20the=20LibreSSL=0A= version=20of=20ossl_typ.h=20does=20not=20include=20=20which=20= cause=20compiler=0Afailure=20due=20to=20missing=20symbol=20(since=20= ffd080d94fe).=20=20Fix=20by=20explicitly=0Aincluding=20.=0A---=0A= =20src/interfaces/libpq/fe-secure-openssl.c=20|=201=20+=0A=201=20file=20= changed,=201=20insertion(+)=0A=0Adiff=20--git=20= a/src/interfaces/libpq/fe-secure-openssl.c=20= b/src/interfaces/libpq/fe-secure-openssl.c=0Aindex=20= f8b2184a1ce..c7651c98ab5=20100644=0A---=20= a/src/interfaces/libpq/fe-secure-openssl.c=0A+++=20= b/src/interfaces/libpq/fe-secure-openssl.c=0A@@=20-25,6=20+25,7=20@@=0A=20= #include=20=0A=20#include=20=0A=20#include=20= =0A+#include=20=0A=20=0A=20#include=20"libpq-fe.h"=0A=20= #include=20"fe-auth.h"=0A--=20=0A2.39.3=20(Apple=20Git-146)=0A=0A= --Apple-Mail=_BE6B4CE5-1D98-463D-B890-EBC6235D90A8--