Re: CREATE EXTENSION without superuser access

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Steve Atkins <steve(at)blighty(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: CREATE EXTENSION without superuser access
Date: 2016-04-27 22:35:29
Message-ID: CAKFQuwadECZ5KOSm2N-4JU2iRM+NTQN_1hLNhzQ_fVH_jxXDPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Apr 27, 2016 at 2:47 PM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 04/27/2016 01:22 PM, Steve Atkins wrote:
>
>> I have an app that would benefit from being able to use pg_partman rather
>> than doing it's own ad-hoc partition management.
>>
>> Unfortunately, some of the places where the app needs to run don't have
>> root access to the database server filesystem, so I can't install the
>> extension in the postgresql extensions directory.
>>
>> I could get all the pg_partman functionality by modifying the extension
>> SQL script to remove the extension functionality and installing the
>> functions in it manually, but then I can't take advantage of the extension
>> features for backups, config tables, upgrades and so on - and it's probably
>> not going to interact well if someone does a "create extension pg_partman"
>> in the database.
>>
>> Is there any way to install an extension either from a SQL connection or
>> from a user-defined directory instead of .../extensions?
>>
>
> Have not tried it, but you might want to take a look at:
>
> http://www.postgresql.org/docs/9.5/interactive/extend-extensions.html
>
> A control file can set the following parameters:
>
> directory (string)
>
> The directory containing the extension's SQL script file(s). Unless an
> absolute path is given, the name is relative to the installation's SHAREDIR
> directory. The default behavior is equivalent to specifying directory =
> 'extension'.
>
>
​Un-researched thoughts here...​

T
​his still doesn't avoid the problem of somehow getting to access to
SHAREDIR.

​I suspect that any extension that is not SQL-only is going to be
problematic - period. Wh​at I'd like, though, is a way to hook into the
extension mechanism for SQL-only extensions. More specifically, having
some blessed way to install a PGXN SQL-only module into a server using only
psql/libpq. Especially being able to do so by pointing to a local tarball
of said PGXN extension. I haven't looked into this at all, though.
Ultimately the result could be used when working RDS and similar hosting
setups.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-04-27 22:47:40 Re: CREATE EXTENSION without superuser access
Previous Message Steve Atkins 2016-04-27 22:30:57 Re: CREATE EXTENSION without superuser access