Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nKyZe-0001mR-WA for pgsql-docs@arkaria.postgresql.org; Fri, 18 Feb 2022 08:25:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nKyZd-0001LT-PY for pgsql-docs@arkaria.postgresql.org; Fri, 18 Feb 2022 08:25:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nKyZd-0001LK-Ho for pgsql-docs@lists.postgresql.org; Fri, 18 Feb 2022 08:25:05 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nKyZa-00026M-VO for pgsql-docs@lists.postgresql.org; Fri, 18 Feb 2022 08:25:04 +0000 Received: from [192.168.11.10] (p2010165-ipbf2302funabasi.chiba.ocn.ne.jp [122.25.95.165]) by oss.nttdata.com (Postfix) with ESMTPSA id CCD6E609D1; Fri, 18 Feb 2022 17:24:58 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.5 at oss.nttdata.com Message-ID: <7fce4874-1433-42e2-6649-e2c57ce50d4e@oss.nttdata.com> Date: Fri, 18 Feb 2022 17:24:58 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: maximum number of backtrace frames logged by backtrace_functions Content-Language: en-US To: Peter Eisentraut , Tom Lane Cc: pgsql-docs@lists.postgresql.org References: <0f0ed9f3-3892-e8a3-51c9-ed268dff6bdd@oss.nttdata.com> <4e16a3e9-e717-05e1-d905-6c21beba80f8@enterprisedb.com> <252159.1643899696@sss.pgh.pa.us> <33675df8-60e1-7da6-8995-3743668fd682@oss.nttdata.com> <9b3e1b97-4d2f-25af-fa52-1b2c31511444@enterprisedb.com> From: Fujii Masao In-Reply-To: <9b3e1b97-4d2f-25af-fa52-1b2c31511444@enterprisedb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022/02/18 16:07, Peter Eisentraut wrote: > On 07.02.22 17:42, Fujii Masao wrote: >> On 2022/02/08 1:12, Peter Eisentraut wrote: >>> This change looks good to me.  There is also backtrace code in assert.c that might want the same treatment. >> >> Yeah, that's good idea! The attached patch also adds the same treatment into assert.c. > > I don't know if using write_stderr() is the right thing here.  Since backtrace_symbols_fd() writes directly to stderr in any case, the whole Windows-specific eventlog dance in write_stderr() wouldn't make sense even if this feature supported Windows.  So I'd just do a straight fprintf(stderr) there. Yeah, maybe. Or even backtrace should be logged by write_stderr() so that it's written to eventlog if necessary? I just wonder why backtrace_symbols_fd() is used only in ExceptionalCondition(). Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION