From: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: replace plugins directory with GUC |
Date: | 2012-10-10 06:49:42 |
Message-ID: | 50751A86.8010109@vmware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 10.10.2012 03:45, Peter Eisentraut wrote:
> About that plugins directory ($libdir/plugins) ... I don't think we ever
> really got that to work sensibly. I don't remember the original design
> discussion, but I have seen a number of explanations offered over the
> years. It's not clear who decides what to put in there (plugin author,
> packager, DBA?), how to put it there (move it, copy it, symlink it? --
> no support in pgxs), and based on what criteria.
Yeah, it would be good to clarify that. It was originally added for the
pldebugger module
(http://archives.postgresql.org/pgsql-hackers/2006-07/msg00803.php), but
I couldn't find any discussion on the decision to create a new 'plugins'
directory.
It was never quite enough for pldebugger, as you still needed to add it
to shared_preload_libraries for it to work, at least if you wanted to
get the full functionality. The installation procedure in the README
clearly instructs to add it to shared_preload_libraries, it doesn't say
anything about local_preload_libraries. I recently refactored pldebugger
to not install in the plugins directory anymore, it now just drops it in
$libdir.
> It would seem to be much more in the spirit of things to simply list the
> allowed plugins in a GUC variable, like
>
> some_clever_name_here = $libdir/this, $libdir/that
>
> but there is probably a reason why this wasn't done that way in the
> first place.
I think the idea was that plugins directory would be easier for
users/admins. I agree that a GUC like above feels more natural.
Now that we support include-directories in postgresql.conf, you could
put a "mylib.conf" file in the include directory that contains the above
line, if you want to enable/disable a module just by moving things
around in the filesystem (after configuring an include directory in
postgresql.conf). But actually, you can't, because there's no way to
append to a setting, you can only override. That's an obvious missing
feature in the include mechanism. Even ignoring the plugins directory,
it would be nice to be able to append libraries to shared_preload_libraries.
- Heikki
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2012-10-10 06:58:36 | Re: [PATCH] Make pg_basebackup configure and start standby [Review] |
Previous Message | Chris Ernst | 2012-10-10 03:50:22 | pg_upgrade not detecting version properly |