From: David Wheeler <david@justatheory.com>
To: Andrei Lepikhov <lepihov@gmail.com>
To: Euler Taveira <euler@eulerto.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Add Postgres module info
Date: Thu, 26 Dec 2024 13:26:11 -0500
Message-ID: <bbdae66a-0685-46ba-87de-d5f8ec252b43@app.fastmail.com> (raw)
In-Reply-To: <4b5b73e2-3edd-496c-8dc1-a50c144937ae@gmail.com>
References: <dd4d1b59-d0fe-49d5-b28f-1e463b68fa32@gmail.com>
<506788.1733941263@sss.pgh.pa.us>
<2qdclwljzvw5abfvo4porr3ehox32icrbtfjaum327ruxts6qm@udexcbweewpq>
<e0e12947-6dfb-4c3a-b6ad-5682a880cda4@app.fastmail.com>
<51416962-9118-41D7-B527-F99D81CF2B57@justatheory.com>
<4b5b73e2-3edd-496c-8dc1-a50c144937ae@gmail.com>
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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: david@justatheory.com, lepihov@gmail.com, euler@eulerto.com, andres@anarazel.de, tgl@sss.pgh.pa.us
Subject: Re: Add Postgres module info
In-Reply-To: <bbdae66a-0685-46ba-87de-d5f8ec252b43@app.fastmail.com>
References: <dd4d1b59-d0fe-49d5-b28f-1e463b68fa32@gmail.com> <506788.1733941263@sss.pgh.pa.us> <2qdclwljzvw5abfvo4porr3ehox32icrbtfjaum327ruxts6qm@udexcbweewpq> <e0e12947-6dfb-4c3a-b6ad-5682a880cda4@app.fastmail.com> <51416962-9118-41D7-B527-F99D81CF2B57@justatheory.com> <4b5b73e2-3edd-496c-8dc1-a50c144937ae@gmail.com> <bbdae66a-0685-46ba-87de-d5f8ec252b43@app.fastmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox