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 1wJzxO-000Tuo-2K for pgsql-hackers@arkaria.postgresql.org; Mon, 04 May 2026 20:31:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wJzxL-008nQ7-1V for pgsql-hackers@arkaria.postgresql.org; Mon, 04 May 2026 20:31:55 +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 1wJzxL-008nPz-0E for pgsql-hackers@lists.postgresql.org; Mon, 04 May 2026 20:31:55 +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 1wJzxH-00000000CKj-1so8 for pgsql-hackers@lists.postgresql.org; Mon, 04 May 2026 20:31:54 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 994615D3DD8 for ; Mon, 04 May 2026 22:31:48 +0200 (CEST) Received: from s981.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id 8A0695D4F95; Mon, 04 May 2026 22:31:48 +0200 (CEST) Received: from localhost (unknown [172.22.191.5]) by s981.loopia.se (Postfix) with ESMTP id 857D222B1757; Mon, 04 May 2026 22:31:48 +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: s473.loopia.se (amavis); dkim=pass (2048-bit key) header.d=yesql.se Received: from s979.loopia.se ([172.22.191.6]) by localhost (s473.loopia.se [172.22.190.13]) (amavis, port 10024) with LMTP id s3jMqypC1ib1; Mon, 4 May 2026 22:31:47 +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 A6CC910BC436; Mon, 04 May 2026 22:31:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1777926707; bh=nkjrBD8guqNgqH7jSM/JbHHF99DjwduQoqQ1mipIVPM=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=WmVOLXLU6F4WUL+QF/ucLYcpmyXrJcbCNvghKkgksw2UG0o+hZRDM9HxNpIULvsJ5 60/RbiL1bdVDFUXsUDnz1CLd65by4ZlYDiJBtddFNwnHrJEce3E2zD6LLef8ajP7sz Zo37KDSiDMGwyaBOCWoSTHcKeRTfJ72mAJG7P40rMpppC+/5cTtyCo+MpexsobQda7 JI1AEiXMwXKVTo+X6EV/ZzMzO2PCTCb3R0Dst+8/n9Du9C4OQiSquikzZWHwOvfidf kWg9iCVopTMk+0fazVRlZsjwHkgLXBbtR6NQsHrZ5R13r4p61c6KBy+TaQ/Y7uPBw/ Nc8iL69Q6711Q== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.2\)) Subject: Re: Serverside SNI support in libpq From: Daniel Gustafsson In-Reply-To: <359138.1777922557@sss.pgh.pa.us> Date: Mon, 4 May 2026 22:31:36 +0200 Cc: Zsolt Parragi , Michael Banck , Jacob Champion , Jelte Fennema-Nio , Heikki Linnakangas , "li.evan.chao" , Michael Paquier , Andres Freund , Pgsql Hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: <1C38F269-E552-4F78-9E88-E91CEDB12F35@yesql.se> <23D19F69-A8DE-4F89-99F6-5FC48762CE4D@yesql.se> <561BF011-1626-43A5-BD82-913E67EEBA8B@yesql.se> <7DA91781-AA47-447A-BA6F-99FE7E83954E@yesql.se> <1CEF92A7-B41A-46A2-BEBA-34307BFE594B@yesql.se> <359138.1777922557@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.3776.700.51.11.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 4 May 2026, at 21:22, Tom Lane wrote: > It seems quite odd to me that load_host(), which in fact returns > HostsFileLoadResult codes, is declared to return int. That seems > to have been done because HostsFileLoadResult wasn't declared in > the same header, but there is no visible reason why it shouldn't be. > Any objection to the attached fixup? At some point during the development of the patch there was a reason = (which I cannot remember right now) for the declaration being in hba.h, but I = clearly missed moving it when that no longrer applied. No objections to the = patch, thanks! > As a side matter, "load_host" seems like a remarkably generic name > that conveys little about what it actually does, and to the extent > that it does convey anything the implication is wrong: it returns > (potentially) info about multiple hosts not just one. Can't we do > better? It's following the naming convention of load_hba() which reads = pg_hba.conf, and load_ident() which reads pg_ident.conf - thus load_hosts() for the = function that reads pg_hosts.conf. Perhaps load_pg_hosts_conf() or = load_hosts_config() would convey more meaning? -- Daniel Gustafsson