On 14 October 2016 16:22:12 EEST, Tom Lane <t...@sss.pgh.pa.us> wrote:
>Heikki Linnakangas <hlinn...@iki.fi> writes:
>> On 10/14/2016 04:05 PM, Tom Lane wrote:
>>> I wrote:
>>>> Py_AddPendingCall is safe to call from a signal handler? That
>>>> be ... quite remarkable.
>> Yes, I believe it is.
>I don't know whether to laugh or cry, but that code is a joke. Just
>silently fail if you can't get the lock?
Heh, ok, let me rephrase: I believe it's *intended* to be callable from a
signal handler :). Whether it actually works is another question. Perhaps
there's some mitigating conditions there, I don't know.
For our use case, it's actually not too bad if Py_AddPendingCall gives up and
does nothing. Then the python function will simply not be interrupted until
next SPI call, which is the current situation anyway.
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: