From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com> |
Cc: | "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Alex Hunsaker <badalex(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Add on_perl_init and proper destruction to plperl [PATCH] |
Date: | 2010-01-27 23:27:50 |
Message-ID: | 16442.1264634870@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com> writes:
> Okay. I could change the callback code to ignore calls if
> proc_exit_inprogress is false. So an abnormal shutdown via exit()
> wouldn't involve plperl at all. (Alternatively I could use use
> on_proc_exit() instead of atexit() to register the callback.)
Use on_proc_exit please. I will continue to object to any attempt
to hang arbitrary processing on atexit().
An advantage of on_proc_exit from your end is that it should allow
you to not have to try to prevent the END blocks from using SPI,
as that would still be perfectly functional when your callback
gets called. (Starting a new transaction would be a good idea
though, cf Async_UnlistenOnExit.)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2010-01-27 23:28:09 | Re: Add on_perl_init and proper destruction to plperl [PATCH] |
Previous Message | Tom Lane | 2010-01-27 23:11:01 | Re: Add on_perl_init and proper destruction to plperl [PATCH] |