diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-08-15 18:26:59 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-08-15 18:26:59 +0000 |
commit | abc3120e9b2055f0934f60ad3e3040db548df8d3 (patch) | |
tree | 2e47098790253c6ecbcbb8b99e3c5e5b5551c9d2 /src/backend/tcop/postgres.c | |
parent | 66541c5aa51bf6128afa8ebb4bb90959b596705f (diff) | |
download | postgresql-abc3120e9b2055f0934f60ad3e3040db548df8d3.tar.gz postgresql-abc3120e9b2055f0934f60ad3e3040db548df8d3.zip |
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.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 9cb61c16cb5..af9578b15ac 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.498 2006/08/13 22:18:08 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.499 2006/08/15 18:26:58 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -3001,6 +3001,12 @@ PostgresMain(int argc, char *argv[], const char *username) on_proc_exit(log_disconnections, 0); /* + * process any libraries that should be preloaded at backend start + * (this likewise can't be done until GUC settings are complete) + */ + process_local_preload_libraries(); + + /* * Send this backend's cancellation info to the frontend. */ if (whereToSendOutput == DestRemote && |