Re: Plugins redux (was Re: [PATCHES] PL instrumentation
От
korryd@enterprisedb.com
Тема
Re: Plugins redux (was Re: [PATCHES] PL instrumentation
Дата
Msg-id
1155250990.24313.114.camel@sakai.localdomain
Ответ на
Список
Дерево обсуждения
Re: [PATCHES] PL instrumentation plugin support (i.e. PL/pgSQL "korryd@enterprisedb.com" <korryd@enterprisedb.com>
Plugins redux (was Re: [PATCHES] PL instrumentation plugin support) Tom Lane <tgl@sss.pgh.pa.us>
Re: Plugins redux (was Re: [PATCHES] PL instrumentation Jeff Davis <pgsql@j-davis.com>
Re: Plugins redux (was Re: [PATCHES] PL instrumentation plugin support) Tom Lane <tgl@sss.pgh.pa.us>
Re: Plugins redux (was Re: [PATCHES] PL instrumentation plugin "korryd@enterprisedb.com" <korryd@enterprisedb.com>
Re: Plugins redux (was Re: [PATCHES] PL instrumentation plugin Tom Lane <tgl@sss.pgh.pa.us>
Re: Plugins redux (was Re: [PATCHES] PL instrumentation "korryd@enterprisedb.com" <korryd@enterprisedb.com>
Re: Plugins redux (was Re: [PATCHES] PL instrumentation Tom Lane <tgl@sss.pgh.pa.us>
Re: Plugins redux (was Re: [PATCHES] PL instrumentation Simon Riggs <simon@2ndquadrant.com>
Re: Plugins redux (was Re: [PATCHES] PL instrumentation plugin "korryd@enterprisedb.com" <korryd@enterprisedb.com>
Re: Plugins redux (was Re: [PATCHES] PL instrumentation plugin Tom Lane <tgl@sss.pgh.pa.us>
Re: Plugins redux (was Re: [PATCHES] PL instrumentation "korryd@enterprisedb.com" <korryd@enterprisedb.com>
Re: Plugins redux (was Re: [PATCHES] PL instrumentation Tom Lane <tgl@sss.pgh.pa.us>
remote query debugging was: Plugins redux Andreas Pflug <pgadmin@pse-consulting.de>
Re: remote query debugging was: Plugins redux Tom Lane <tgl@sss.pgh.pa.us>
Re: remote query debugging was: Plugins redux Andreas Pflug <pgadmin@pse-consulting.de>
> Also, should we create an on_proc_exit() handler that would unload all > dynamic libraries (specifically to call the _PG_fini() functions)? Yeah, I thought about that too, but I'm inclined not to do it; it seems like just excess cycles. The process is quitting anyway, so the only reason this would be useful is if the library thinks it's going to update external or shared state during _PG_fini ... and on the whole that sounds like a bad idea. Besides, if a library really needs this it can add its own on_proc_exit handler.
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. Otherwise, a dynamic library might register a function pointer with on_proc_exit() and then leave a dangling pointer when it gets unloaded.
Given that, I assume you don't feel the need to unload old shared libraries if the user (a superuser) removes an entry from backend_load_libraries, right?
In fact, it looks _PG_fini() is only called if you *reload* a library, unless I'm missing something somwhere.
-- Korry Douglas korryd@enterprisedb.com EnterpriseDB http://www.enterprisedb.com |
В списке pgsql-hackers по дате отправления