Hi,
On 2015-06-18 16:36:17 -0400, Eric Ridge wrote:
> I've written an extension that hooks ExecutorStart_hook and
> ExecutorEnd_hook. The hooks are assigned in _PG_init() (and the previous
> ones saved to static vars) and reset to the previous values in _PG_fini().
> Maybe also of interest is the extension library is set in postgresql.conf
> as a local_preload_libraries. This is with Postgres 9.3.4.
How does your _PG_init() actually look like?
I'd suggest adding an error check that prev_ExecutorStartHook is
unequals to your function when you assign it.
> What happens is that rarely (and of course never on my development
> machine), the saved "prev_ExecutorXXXHook" gets set to the current value of
> ExecutorXXX_hook, so when my hook function is called:
Did you check whether it's compiler/compiler flag dependant?
Greetings,
Andres Freund