Re: pg_cancel_backend() does not work with buzz queries - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_cancel_backend() does not work with buzz queries
Date
Msg-id 15887.1191421249@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_cancel_backend() does not work with buzz queries  (Magnus Hagander <magnus@hagander.net>)
List pgsql-general
Magnus Hagander <magnus@hagander.net> writes:
> Does pl/python listen to SIGINT during execution of functions? If not,
> that'd be an explanation - if it's stuck inside a pl/python function...
> AFAIK, pl/pgsql does listen for SIGINT during execution, but I don't nkow
> abuot plpython.

It does not, unless the function contains SPI calls that'll return
control into PG code.

Short answer: don't write infinite loops in plpython.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: PITR Recovery and out-of-sync indexes
Next
From: Oleg Bartunov
Date:
Subject: Re: Tsearch2 Dutch snowball stemmer in PG8.1