From: Andrei Lepikhov <lepihov@gmail.com>
To: David Wheeler <david@justatheory.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: Fri, 27 Dec 2024 08:09:55 +0700
Message-ID: <0edb788c-7376-4785-ae41-4544ad9bc57b@gmail.com> (raw)
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>
On 12/27/24 01:26, David Wheeler wrote:
> 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?
> 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).
I still can't get your point.
We intentionally wrote a library, not an extension. According to user
usage and upgrade patterns, it works across the whole instance and in
any database or locally in a single backend and ends its impact at the
end of its life.
Also, it doesn't maintain any object in the database and is managed by GUCs.
For example, my libraries add query tree transformations/path
recommendations to the planner. It doesn't depend on a database and
doesn't maintain DSM segments and users sometimes want to use it in
specific backends, not databases - in a backend dedicated to analytic
queries without extra overhead to backends, picked out for short
queries. For what reason do I need to add complexity and call 'CREATE
EXTENSION' here and add version info only in a specific database? Just
because of a formal one-directory structure?
--
regards, Andrei Lepikhov
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: lepihov@gmail.com, david@justatheory.com, euler@eulerto.com, andres@anarazel.de, tgl@sss.pgh.pa.us
Subject: Re: Add Postgres module info
In-Reply-To: <0edb788c-7376-4785-ae41-4544ad9bc57b@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> <bbdae66a-0685-46ba-87de-d5f8ec252b43@app.fastmail.com> <0edb788c-7376-4785-ae41-4544ad9bc57b@gmail.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