On Thu, Mar 6, 2014 at 8:18 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I don't think _exit() is a terribly good idea. Consider the possibility
> that some third-party library loaded into the backend has also established
> an atexit callback, and unlike what we did, that code does need to get
> control in a subprocess exit.
Good point.
> Could you try patching atexit_callback as above, and verify that
> it does what you want (with or without the on_exit_reset() in your
> extension)?
That did it as well. Things are peachy (at least for this scenario).
Would you like me to submit a patch (with you as the author of course)?
Thanks,
Pete