"korryd@enterprisedb.com" <korryd@enterprisedb.com> writes:
> It seems a little dangerous for a dynamic library to register an
> on_proc_exit() handler. If we ever add support for unloading a dynamic
> library, we'll have to add an unregister_on_proc_exit() too.
True, but there might be other uses for such a thing anyway. I can't
see any objection to adding that routine.
> In fact, it looks _PG_fini() is only called if you *reload* a library,
> unless I'm missing something somwhere.
Sure, because we don't currently have a routine for unloading a library
without immediately reloading it.
regards, tom lane