pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrei Lepikhov <lepihov@gmail.com>
To: David E. 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: Tue, 24 Dec 2024 08:49:02 +0700
Message-ID: <4b5b73e2-3edd-496c-8dc1-a50c144937ae@gmail.com> (raw)
In-Reply-To: <51416962-9118-41D7-B527-F99D81CF2B57@justatheory.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>

On 12/24/24 02:23, David E. Wheeler wrote:
> On Dec 11, 2024, at 19:49, Euler Taveira <euler@eulerto.com> wrote:
> 
>>> FWIW, Id like to have some more information in there, without commenting on
>>> the specifics.
>>
>> +1 for the general idea.
> 
> Same.
> 
>> I received some reports like [1] related to wal2json
>> that people wants to obtain the output plugin version. Since it is not installed
>> via CREATE EXTENSION, it is not possible to detect what version is installed,
>> hence, some tools cannot have some logic to probe the module version.
> 
> I’m all for additional metadata for native extensions, but I’d also like to draw attention to the “Future” section my proposal[1] to require that module-only extensions also include a control file and be loadable via CREATE EXTENSION (and proposed *_preload_extensions GUCs[2]). This would unify how all types of extensions are added to a database, and would include version information as for all other CREATE EXTENSION extensions.
Looking into the control file, I see that most parameters are 
unnecessary for the library. Why do we have to maintain this file?
In my experience, extra features are usually designed as shared 
libraries to 1) reduce complexity, 2) work across the overall cluster, 
3) be dynamically loaded, 4) be hidden, and not waste the database with 
any type of object. - remember, applications sometimes manage their data 
through an API; databases and any objects inside may be created/moved 
automatically, and we want to work in any database.
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.
It would be interesting to read about your real-life cases that caused 
your proposal.

-- 
regards, Andrei Lepikhov





view thread (52+ messages)  latest in thread

Message-ID: <4b5b73e2-3edd-496c-8dc1-a50c144937ae@gmail.com>
Permalink:  ../4b5b73e2-3edd-496c-8dc1-a50c144937ae@gmail.com/
Also on:    postgresql.org/message-id/4b5b73e2-3edd-496c-8dc1-a50c144937ae@gmail.com

 · 

reply

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: <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>

* 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