Search Postgresql Archives

Re: dynamic loading of c-functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 21, 2005 at 10:40:21AM -0700, TJ O'Donnell wrote:
> It is clear from the manual that c-functions can cause the dynamic loading
> of .so's and that subsequent usage in the same database session will use
> the already loaded function.  But, when the session is done, will the loaded
> function remain in the server for subsequent sessions?
> When/how does a dynamically loaded .so get unloaded?
> I want to avoid preloading .so's at server startup, but also avoid dynamically
> loading them for ~every~ session.

PostgreSQL uses multiple process, so when you close your connection it
releases the address space, including the loaded library. There's no
way to preserve across multiple connections.

The two options are:
- Load at server startup, then they're ready to go as soon as you
connect.  preload_libraries option.
- Dynamic loading when you use the function. Default option.

Hope this helps,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment: pgphd79jcxu7R.pgp
Description: PGP signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux