Greg Stark <greg.stark@enterprisedb.com> writes:
> Hmm. One case where this logic might not be true would be if the dll
> relies on c++ style static initializers and destructors. In that case
> it may very well leave hooks in place in case of an error and only
> clean them up when you call dlclose().
Interesting point, but considering that we don't support or encourage
use of C++ anyway, it shouldn't carry much weight in our estimate
of how an init function is likely to behave.
Also, wouldn't C++ initializers most likely get called by the dynamic
loader itself, not during the PG_init function?
regards, tom lane