From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | "David E(dot) Wheeler" <david(at)justatheory(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: DSO Terms Galore |
Date: | 2024-07-23 11:26:31 |
Message-ID: | d07b9caf-fd08-439b-a57e-b161c556e34a@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 19.07.24 21:27, David E. Wheeler wrote:
> I’m trying to understand the standard terms for extension libraries. There seem too a bewildering number of terms used to refer to a shared object library, for example:
>
> * LOAD[1]:
> * “shared library”
> * “shared library file”
> * dynamic_library_path[2]:
> * “dynamically loadable module”
> * xfunc-c[3]:
> * “dynamically loadable object”
> * “shared library”
> * “loadable object”
> * “loadable object file”
> * “object file”
> * “dynamically loaded object file”
> * pg_config[5]:
> * “object code libraries” (static?)
> * “dynamically loadable modules”
> * PGXS[4]:
> * “MODULES”
> * “shared-library objects”
> * “shared library”
I think in the POSIX-ish realm, the best term is "dynamically loadable
library". It's a library, because it contains functions you can, uh,
borrow, just like a static library. And it's dynamically loadable, as
opposed to being loaded in a fixed manner at startup time.
Also, the "dl" in dlopen() etc. presumably stands for dynamic-something
load-something.
Libtool uses the term "dlopened module" for this, and the command-line
option is -module.
(https://www.gnu.org/software/libtool/manual/libtool.html#Dlopened-modules)
Meson uses shared_module() for this. (It has shared_library() and
static_library() for things like libpq.)
Things like "object" or "object file" or probably wrong-ish. I
understand an object file to be a .o file, which you can't dlopen directly.
Shared library is semi-ok because on many platforms, link-time shared
libraries (like libpq) and dynamically loadable libraries (like plpgsql)
are the same file format. But on some they're not, so it leads to
confusion.
I think we can unify this around terms like "dynamically loadable
library" and "dynamically loadable module" (or "loaded" in cases where
it's talking about a file that has already been loaded).
From | Date | Subject | |
---|---|---|---|
Next Message | jian he | 2024-07-23 12:06:33 | Re: pgsql: Add more SQL/JSON constructor functions |
Previous Message | Amit Kapila | 2024-07-23 11:25:07 | Re: Slow catchup of 2PC (twophase) transactions on replica in LR |