Re: libpq: Process buffered SSL read bytes to support records >8kB on async API

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: solai v <solai(dot)cdac(at)gmail(dot)com>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Lars Kanis <lars(at)greiz-reinsdorf(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Merlin Moncure <mmoncure(at)gmail(dot)com>
Subject: Re: libpq: Process buffered SSL read bytes to support records >8kB on async API
Date: 2026-07-09 15:06:55
Message-ID: 6A9E7815-BD5A-4C31-A515-48159823406B@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 7 Jul 2026, at 17:58, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> 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 == INT_MAX)
^
1 error generated.

AFAICS it's because openssl/conf.h includes openssl/ossl_typ.h which in turn
includes <limits.h> 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

Attachment Content-Type Size
0001-ssl-Include-limits.h-to-get-INT_MAX-when-using-Libre.patch application/octet-stream 1.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2026-07-09 15:15:46 Re: json/jsonb cleanup + FmgrInfo caching
Previous Message Ayush Tiwari 2026-07-09 14:48:19 Re: REVOKE's CASCADE protection doesn't work with INHERITed table owners