Re: maximum number of backtrace frames logged by backtrace_functions - Mailing list pgsql-docs

From Fujii Masao
Subject Re: maximum number of backtrace frames logged by backtrace_functions
Date
Msg-id b22cd3c0-d76b-0379-5971-8637b65b8e87@oss.nttdata.com
Whole thread Raw
In response to Re: maximum number of backtrace frames logged by backtrace_functions  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: maximum number of backtrace frames logged by backtrace_functions  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List pgsql-docs

On 2022/02/02 16:20, Peter Eisentraut wrote:
> On 01.02.22 18:04, Fujii Masao wrote:
>> The maximum number of backtrace frames logged by backtrace_functions is 100. Isn't it better to document this
informationso that users can understand not all backtrace always can be logged? Patch attached.
 
> 
> The 100 was chosen as more than you'll ever need.  If you are encountering cases with more than that, let's increase
thelimit.
 

I encountered the "more than 100 backtrace frames" case when investigating the bug of pg_log_query_plan() patch [1].
Sincethe function that the patch added can be called repeatedly during call to that function, the backtrace became
largerthan 100. I think this is not general case, so basically 100 sounds enough limit size to me.
 

OTOH I think it's helpful if the limit is documented when I occasionally encounter the case and want to understand why
allbacktrace frames are not logged.
 

[1]
https://commitfest.postgresql.org/37/3142/

Regards,

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



pgsql-docs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Conventions
Next
From: Peter Eisentraut
Date:
Subject: Re: maximum number of backtrace frames logged by backtrace_functions