Add server support for "plugin" libraries that can be used for add-on tasks
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 15 Aug 2006 18:26:59 +0000 (18:26 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 15 Aug 2006 18:26:59 +0000 (18:26 +0000)
commit5f3b45e1941cd6478edff415140bf545bd0a6206
tree68b3203176c568632b6783194930d526fa7b0302
parent1580b0629e60526e47ac90753aebf1af42258010
Add server support for "plugin" libraries that can be used for add-on tasks
such as debugging and performance measurement.  This consists of two features:
a table of "rendezvous variables" that allows separately-loaded shared
libraries to communicate, and a new GUC setting "local_preload_libraries"
that allows libraries to be loaded into specific sessions without explicit
cooperation from the client application.  To make local_preload_libraries
as flexible as possible, we do not restrict its use to superusers; instead,
it is restricted to load only libraries stored in $libdir/plugins/.  The
existing LOAD command has also been modified to allow non-superusers to
LOAD libraries stored in this directory.

This patch also renames the existing GUC variable preload_libraries to
shared_preload_libraries (after a suggestion by Simon Riggs) and does some
code refactoring in dfmgr.c to improve clarity.

Korry Douglas, with a little help from Tom Lane.
doc/src/sgml/config.sgml
doc/src/sgml/ref/load.sgml
src/backend/postmaster/postmaster.c
src/backend/tcop/postgres.c
src/backend/tcop/utility.c
src/backend/utils/fmgr/dfmgr.c
src/backend/utils/init/miscinit.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/fmgr.h
src/include/miscadmin.h