Re: Serverside SNI support in libpq

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Zsolt Parragi <zsolt.parragi@percona.com>
Cc: Michael Banck <mbanck@gmx.net>, Jacob Champion <jacob.champion@enterprisedb.com>, Jelte Fennema-Nio <postgres@jeltef.nl>, Heikki Linnakangas <hlinnaka@iki.fi>, "li.evan.chao" <li.evan.chao@gmail.com>, Michael Paquier <michael@paquier.xyz>, Andres Freund <andres@anarazel.de>, Pgsql Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-03-19T10:38:22Z
Lists: pgsql-hackers
> On 19 Mar 2026, at 10:55, Zsolt Parragi <zsolt.parragi@percona.com> wrote:
> 
>> Isn't pg_hosts.conf a really (too) generic name for this
>> feature?
> 
> My question earlier about a different key=value format (json5?), was
> related to this, but approached it from a different direction: maybe
> it could be more generic in the future, supporting different settings,
> maybe even in an extensible way? With the current SNI handling already
> relates to multi tenancy, and allowing custom per hosts settings would
> move in the same direction.

Introducing a new config format is for sure an interesting idea, but it's a
much bigger body of work which needs it's own discussion and patchset, it
should not be as part of another feature.

--
Daniel Gustafsson




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Declare load_hosts() as returning HostsFileLoadResult.

  2. ssl: Skip passphrase reload tests in EXEC_BACKEND builds

  3. ssl: Serverside SNI support for libpq

  4. ssl: Add tests for client CA