Re: Considering signal handling in plpython again - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Considering signal handling in plpython again
Date
Msg-id 974B452F-601D-401F-87FF-B02B8250588F@iki.fi
Whole thread Raw
In response to Re: Considering signal handling in plpython again  (Hubert Zhang <hzhang@pivotal.io>)
Responses Re: Considering signal handling in plpython again  (Hubert Zhang <hzhang@pivotal.io>)
List pgsql-hackers

On 11 May 2018 10:01:56 EEST, Hubert Zhang <hzhang@pivotal.io> wrote:
>2. Add a flag in hook function to indicate whether to call
>Py_AddPendingCall.
>This is straightforward.(I prefer it)

Yeah, that's what I had in mind, too. A global bool variable that's set when you enter libpython, and cleared on
return.Need to handle nesting, i.e if a PL/python function runs a slow query with SPI, and cancellation happens during
that.And the case that the SPI query calls another PL/python function. 

- Heikki


pgsql-hackers by date:

Previous
From: Hartmut Holzgraefe
Date:
Subject: Re: Having query cache in core
Next
From: Mike Blackwell
Date:
Subject: perlcritic: Missing "return"