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.94.2) (envelope-from ) id 1u1pUT-008l27-3G for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Apr 2025 16:38:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u1pUR-0014up-Gq for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Apr 2025 16:38:27 +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.94.2) (envelope-from ) id 1u1pUQ-0014ub-MR for pgsql-hackers@lists.postgresql.org; Mon, 07 Apr 2025 16:38:27 +0000 Received: from fout-b1-smtp.messagingengine.com ([202.12.124.144]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u1pUO-003VLf-2A for pgsql-hackers@postgresql.org; Mon, 07 Apr 2025 16:38:26 +0000 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.stl.internal (Postfix) with ESMTP id 5588911400C9; Mon, 7 Apr 2025 12:38:23 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Mon, 07 Apr 2025 12:38:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm1; t=1744043903; x=1744130303; bh=z1CpYT6qeAnGhKI+kiz+zGfn3B0MliqB 4EYcLEbOWRw=; b=j4JcFClqCTgDTgVVjNs/iFgzRR3IfQ9XvYNuLvW6M0WGckNl A0t9dIFs7Dg/78lYuKlwF32nJuXNuaBF+WTeETcNDV1T4vgMOey9wm7D+cyVs5pj 9pIVNsJcxl3CDQiT6oErGkx3TNsgJClTrZZY66uloYldE7rXDvLGgY5u0y4jMxNT XRyCeWNolgGiKkd0bt1ECWNofWJJcPuLbOav1+QB3NJMl7K0563W/gwym4vGpSV4 NRE8MvD/j0oQGOstN/AwGA3CgDwr24aNd+ETRIywim1aq/CaZzupTa9tE6UExMVH cBlZtwxgwULrYu4m+navzhLoYgYS8oTS4Hp9ww== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1744043903; x= 1744130303; bh=z1CpYT6qeAnGhKI+kiz+zGfn3B0MliqB4EYcLEbOWRw=; b=r +myVdOQ1TUj3YfMAVQUYAg4tKXWvnPsrN8yd7KTLYfhYrXEp+A7OhnTnNxq26+IS XDgNxevIvZScHYMtHYlypV20vR5EwqrXsmWYvJzGNqFZ0ol07Ud7qG9pQUVGjF46 V44ogXrr8XzIVYx99csoXTPpRusvzMf7P8Vc+80RcXrSDUpBPsF8U7PqcdtmyHHH xuKAbA+nSpJJVwAeEkeLeqvtnk3vqz1QFX004AJiJTKc/rnVwazwAI+Ai49yxHWe 3FJmLM+mFftdb7lQtHUPmKpzOl+I/URKmBVbO4pVQQASaaQh/QfVxH8kFStjHaMQ L7/iMVIepypIdk3JHlCxQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtddtieelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddt vdejnecuhfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvih hsvghnthhrrghuthdrohhrgheqnecuggftrfgrthhtvghrnhepvdeltdejfeehudejkefh ieehhfeigffhudevtdefvdeugeehgfekgfeuleetfefhnecuffhomhgrihhnpehgihhthh husgdrtghomhdpshhtrggtkhhovhgvrhhflhhofidrtghomhdpphhoshhtghhrvghsqhhl rdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgpdhnsggprhgtphhtthhopedutddp mhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprghnughrvghssegrnhgrrhgriigvlh druggvpdhrtghpthhtohepjhgrtghosgdrtghhrghmphhiohhnsegvnhhtvghrphhrihhs vggusgdrtghomhdprhgtphhtthhopehmhihonhesuggvsghirghnrdhorhhgpdhrtghpth htohepthhglhesshhsshdrphhghhdrphgrrdhushdprhgtphhtthhopegsrhhutggvsehm ohhmjhhirghnrdhushdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpohhsth hgrhgvshhqlhdrohhrghdprhgtphhtthhopegurghnihgvlheshigvshhqlhdrshgvpdhr tghpthhtohepthhhohhmrghsrdhmuhhnrhhosehgmhgrihhlrdgtohhmpdhrtghpthhtoh epsgihrghvuhiikedusehgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Apr 2025 12:38:20 -0400 (EDT) Message-ID: <170e7e57-fe43-4e7e-8566-a96fcdf23075@eisentraut.org> Date: Mon, 7 Apr 2025 18:38:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER To: Andres Freund Cc: Jacob Champion , Christoph Berg , Tom Lane , Bruce Momjian , PostgreSQL Hackers , Daniel Gustafsson , Thomas Munro , Nazir Bilal Yavuz , Antonin Houska References: <1120967.1742504934@sss.pgh.pa.us> <5bec3d4f-613f-425b-88c4-59e71c70f7d6@eisentraut.org> Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 07.04.25 16:43, Andres Freund wrote: >>> While I was looking into this I found that Debian's going to use the >>> existence of an SONAME to check other things, which I assume will make >>> Christoph's life harder. I have switched over to >>> 'libpq-oauth-.so', without any SONAME or symlinks. >> Yes, this is correct. We want a shared module, not a shared library, in >> meson parlance. > It's not entirely obvious to me that we do want that. > > There recently was a breakage of building with PG on macos with meson, due to > the meson folks implementing a feature request to move away from using > bundles, as > 1) bundles apparently aren't supported on iOS > 2) there apparently aren't any restrictions left that require using bundles, > and there haven't been for a while. > > They've now reverted these changes, due to the postgres build failures that > caused as well as recognizing they probably moved too fast, but the iOS > portion seems like it could be relevant for us? Um, interesting. AFAICT, the change you mention was reverted from the 1.7 branch because it was accidentally backpatched, but it remains in master. (For those just catching up: https://github.com/mesonbuild/meson/issues/14240 https://github.com/mesonbuild/meson/pull/14340 https://github.com/mesonbuild/meson/commit/fa3f7e10b47d1f2f438f216f6c44f56076a01bfc ) Overall, this seems like a good idea, as it removes a historical platform-specific particularity. (I found a historical analysis at .) But it does break existing users that add -bundle_loader, because -bundle_loader only works with -bundle and is rejected with -dynamiclib. To test, I patched the makefiles to use -dynamiclib instead of -bundle, which also required removing -bundle_loader, and it also required adding -Wl,-undefined,dynamic_lookup. This built correctly and generally worked. But then you also run into a new variant of this issue: https://www.postgresql.org/message-id/E1o4HOv-001Oyi-5n@gemulon.postgresql.org Because there is no -bundle_loader, the symbol search order appears to be different, and so hash_search() gets found in the OS library first. So this is all going to be a mess at some point sooner or later. :-( > Afaict this library doesn't have unresolved symbols, due to just linking to > libpq. So I don't think we really need this to be a shared module? Apart from the hard distinction on macOS, in terms of the build system, the distinction between "library" and "module" is mainly whether the resulting library gets a soname, version symlinks, and what directory it is installed in, so in that sense the discussion so far indicates that it should be a module. I suppose on macOS we could link it like a library and install it like a module, but that would effectively create a third category, and I don't see why that would be worth it.