Kyotaro HORIGUCHI <horiguchi.kyot...@lab.ntt.co.jp> writes: > With the attached patch, external modules are loaded RTLD_LOCAL > by default. PG_MODULE_EXPORT_SYMBOL in a module source files let > it loaded RTLD_GLOBAL. I suppose this is the change with the > least impact on existing modules because I believe most of them > don't need to export symbols.
This seems really hacky :-( In the PL cases, at least, it's not so much the PL itself that wants to export symbols as the underlying language library (libpython, libperl, etc). You're assuming that an action on the PL .so will propagate to the underlying language .so, which seems like a pretty shaky assumption. I wonder also whether closing and reopening the DL handle will really do anything at all for already-loaded libraries ... regards, tom lane