We have occasional need to run very long-running pl/tcl scripts. If the request
is cancelled (say, by the user hitting ^c in psql) the server-side script still
runs to completion.
There is a C-level variable QueryCancelPending that can be used to monitor for
this case, but it’s not visible at t
On 6/8/18, 1:12 PM, "Andres Freund" wrote:
I'm not terribly opposed to this, but I wonder if the much more
pragmatic solution is to just occasionally call a database function that
checks this? You could just run SELECT 1 occasionally :/
That seems to work, and I suppose in most c
On 6/8/18, 1:12 PM, "Andres Freund" wrote:
I'm not terribly opposed to this, but I wonder if the much more
pragmatic solution is to just occasionally call a database function that
checks this? You could just run SELECT 1 occasionally :/
After further discussion with our team:
Would
On 6/8/18, 2:21 PM, "Andres Freund" wrote:
Not sure I quite understand what you mean. You're thinking of the case
where you're processing rows one-by-one with a cursor? Or that a single
spi call takes a long while to process the query?
The former, I believe. One example (lightly obfus