As for forcing the library load to occur, I propose a new GUC variable "backend_load_libraries" that is much like the postmaster's preload_libraries, except that the requested library loads happen at backend start time instead of in the postmaster. Then we need write and document the code only once, and there are other possible uses for it besides PL plugins.
Any thoughts about where to put the call to process_backend_libraries() (the new function to handle backend_load_libraries)?
I'm thinking that it should go in PostgresMain(), just after (before?) the call to BeginReportingGUCOptions() - by that time, we know whether we are a superuser and we have processed all GUC options.
Also, should we create an on_proc_exit() handler that would unload all dynamic libraries (specifically to call the _PG_fini() functions)?
-- Korry
-- Korry Douglas [EMAIL PROTECTED] EnterpriseDB http://www.enterprisedb.com |