Re: RFC: Logging plan of the running query - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: RFC: Logging plan of the running query
Date
Msg-id 3e94e9b3-83ef-c328-0c5c-f93aa3224790@oss.nttdata.com
Whole thread Raw
In response to Re: RFC: Logging plan of the running query  (torikoshia <torikoshia@oss.nttdata.com>)
Responses Re: RFC: Logging plan of the running query  (torikoshia <torikoshia@oss.nttdata.com>)
List pgsql-hackers

On 2022/02/09 0:12, torikoshia wrote:
> BTW, since the above example results in calling ExecutorRun() only once, the output didn't differ even after
ActiveQueryDescis reset to save_ActiveQueryDesc.
 
> 
> The below definition of test() worked as expected.
> 
>   create or replace function test () returns int as $$
>   begin
>       perform 1;
>       perform 1/0;
>   exception when others then
>       return 30;
>   end;
>   $$ language plpgsql;
So in this case ActiveQueryDesc set by ExecutorRun() called only once is still valid even when AbortSubTransaction() is
called.That is, that ActiveQueryDesc should NOT be reset to save_ActiveQueryDesc in this case, should it?
 

OTOH, in your example, ActiveQueryDesc set by the second call to ExecutorRun() should be reset in
AbortSubTransaction().Then ActiveQueryDesc set by the first call should be valid.
 

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: making pg_regress less noisy by removing boilerplate
Next
From: Tom Lane
Date:
Subject: Re: making pg_regress less noisy by removing boilerplate