Re: [HACKERS] Transaction control in procedures - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] Transaction control in procedures
Date
Msg-id 50c4509a-e075-43ec-a135-b868764104a7@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] Transaction control in procedures  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: [HACKERS] Transaction control in procedures  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
On 11/16/17 18:35, Simon Riggs wrote:
> For the first two answers above the answer was "currently executing
> statement", yet the third answer seems to be the procedure. So that is
> a slight discrepancy.

That's the way function execution, or really any nested execution,
currently works.

> ISTM we would like
> 
> 1) a way to cancel execution of a procedure
> 2) a way to set a timeout to cancel execution of a procedure
> 
> as well as
> 
> 1) a way to cancel execution of a statement that is running within a procedure
> 2) a way to set a timeout to cancel execution of a statement in a procedure
> 
> Visibility of what a routine is currently executing is the role of a
> debugger utility/API.

That would probably be nice, but it would be an entirely separate
undertaking.  In particular, getting insight into some kind of execution
stack would necessarily be language specific.  We do have some of that
for PL/pgSQL of course.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Ildus Kurbangaliev
Date:
Subject: Re: Repetitive code in RI triggers
Next
From: Justin Pryzby
Date:
Subject: PG10.1 autovac killed building extended stats