Re: extension_control_path

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Sergey Muraviov <sergey(dot)k(dot)muraviov(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: extension_control_path
Date: 2014-02-28 13:27:53
Message-ID: 20140228132753.GD2921@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Dimitri Fontaine (dimitri(at)2ndQuadrant(dot)fr) wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > I think we should get rid of the module_pathname business, and
> > extensions' SQL files should just refer to the base file name and rely
> > on the dynamic library path to find the files. What would we lose if we
> > did that?
>
> Control over *which* mylib.so file gets loaded for a specific sql
> script. That's the whole namespace issue Stephen is worried about.

Indeed.

> If you're testing the new version of an extension before installing it
> properly, then you will have the current and the new versions of the
> .so, with the exact same name, at different places.

Hrm. This makes me wonder if there was a way we could check a .so
against the definition of what it "should" be in the control file. As
in, somehow include the extension name and version in the
PG_MODULE_MAGIC. That could be good on a couple of levels..

> Note that when using base file name only, then you could also have a
> clash with a dynamic library of the same name installed on the system,
> even if not made to be loaded by PostgreSQL.

Such as addressing this- perhaps with a GUC that says "only load .so's
that have a PG_MODULE_MAGIC and whose extension names/versions match
what is in the associated control file".

> Some extensions are using way too generic names. Hint: prefix.so.

Agreed.

Thanks!

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2014-02-28 13:34:26 Re: extension_control_path
Previous Message Ali Piroozi 2014-02-28 13:06:01 Equivalence Rules