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 1tQsZM-005lGK-CG for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Dec 2024 18:26:49 +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 1tQsZK-003t3g-3F for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Dec 2024 18:26:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tQsZJ-003t3Y-3M for pgsql-hackers@lists.postgresql.org; Thu, 26 Dec 2024 18:26:45 +0000 Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tQsZD-001kL7-Hn for pgsql-hackers@postgresql.org; Thu, 26 Dec 2024 18:26:43 +0000 Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 4EE5C13801C9; Thu, 26 Dec 2024 13:26:36 -0500 (EST) Received: from phl-imap-13 ([10.202.2.103]) by phl-compute-02.internal (MEProxy); Thu, 26 Dec 2024 13:26:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=justatheory.com; 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=1735237596; x=1735323996; bh=woIP7sSW/4kSp/InqFn2q9PMTHslUEMh vWtwt1ASU+c=; b=blPuaTEj7idkrwrhmxfb+vZCRwjXlPPZRus9leDYv6VvySme /IASgMs22yLGPUqMEbVEURyY88FAabrGpotTOp0kMm9ZZgjL85RQFhazdtaYFz2T 0pz7gKoHN3eEJVf6msj9cZV+g9+fe5NcDv2N91X7QRfF9F8hjJR+HO4O1pZ+Wk1L N3isnv+exc6L/NqzOvTGHfn74EOr6pd9WLeCgNDR1h6Eiai/X7m6M36XlRQPlCuN I/XuF/WDR+qxu8w/p5vYbCxEy42ErnERQbaElcJcGMkRcPzfqzbzgKPpH//sc4PK kwPGC/J0PYxB7F6MTsD8CvSwNRmiNyHUzHfD3A== 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=1735237596; x= 1735323996; bh=woIP7sSW/4kSp/InqFn2q9PMTHslUEMhvWtwt1ASU+c=; b=N TXzpG73kBFmLREZC5enVxBV2bH6snxOFFd42SDFuqP/js/qD+2pJ/xWBsph+ZgAR p+BAR7Ix0tlGH9R7I3mzymz0DHWzOd/tGaFYgb/F3mrWZf1RdAJMfMjF1UoAbauY SZ8otQUIgbEYuPNShQbUtcf6Ky3OrBTwiO0uAOjO9ZGi0JsAPDyE7fhxTS6v/aIc o+udjEixQ2xPSOMdvwEsvGxiLANCMzN6deLjzhEBWO7cxEawA/i/dxZLgM4lXeR0 3+DSUkfV8zllhlUKvwApdsrByvSezsaVObqj1FjyRMATvFOVofACMuSwG7HVL1Ll vpxJgxv70mIocBwXyqU1w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddukedguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefoggffhffvvefkjghfufgtgfesthejredtredt tdenucfhrhhomhepfdffrghvihguucghhhgvvghlvghrfdcuoegurghvihgusehjuhhsth grthhhvghorhihrdgtohhmqeenucggtffrrghtthgvrhhnpedvfeeludduueduhfdvueeu hfetgfdtleeuieejfeevtefgjeefteevfeehffdthfenucffohhmrghinhepjhhushhtrg hthhgvohhrhidrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegurghvihgusehjuhhsthgrthhhvghorhihrdgtohhmpdhnsggprhgtph htthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrnhgurhgvshesrghn rghrrgiivghlrdguvgdprhgtphhtthhopegvuhhlvghrsegvuhhlvghrthhordgtohhmpd hrtghpthhtoheplhgvphhihhhovhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhs qhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehtgh hlsehsshhsrdhpghhhrdhprgdruhhs X-ME-Proxy: Feedback-ID: i7c334307:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 5BC4C1F00073; Thu, 26 Dec 2024 13:26:35 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 Date: Thu, 26 Dec 2024 13:26:11 -0500 From: "David Wheeler" To: "Andrei Lepikhov" , "Euler Taveira" Cc: "Andres Freund" , "Tom Lane" , pgsql-hackers Message-Id: In-Reply-To: <4b5b73e2-3edd-496c-8dc1-a50c144937ae@gmail.com> References: <506788.1733941263@sss.pgh.pa.us> <2qdclwljzvw5abfvo4porr3ehox32icrbtfjaum327ruxts6qm@udexcbweewpq> <51416962-9118-41D7-B527-F99D81CF2B57@justatheory.com> <4b5b73e2-3edd-496c-8dc1-a50c144937ae@gmail.com> Subject: Re: Add Postgres module info Content-Type: text/plain Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Dec 23, 2024, at 8:49 PM, Andrei Lepikhov wrote: > Looking into the control file, I see that most parameters are > unnecessary for the library. Why do we have to maintain this file? Most of the parameters apply to SQL extensions. > The 'CREATE EXTENSION' statement would have made sense if we had > register/unregister hook machinery. Without that, it seems it is just > about maintaining the library's version and comments locally in a > specific database. Well, either way you have to load the extension, either CREATE EXTENSION to load an SQL extension (and any related shared modules), or LOAD or *_preload_libraries to load a shared module. I propose to add support for shared-module-only extensions to CREATE/UPDATE/DROP EXTENSION. It would then both insert the version info in the database (from the control file, at least), and load the shares module(s). > It would be interesting to read about your real-life cases that caused > your proposal. They're in the first section of [1]. The desire to group all the files for an extension in a single directory led to a conflict with the exiting LOAD patterns, which in the final section of [1] I attempt to resolve by proposing a single way to manage *all* extensions, instead of the two separate patterns we have today. Best, David [1]: https://justatheory.com/2024/11/rfc-extension-packaging-lookup/