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 1lejZa-0001Fw-K4 for pgsql-hackers@arkaria.postgresql.org; Thu, 06 May 2021 19:22:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lejZZ-0000A7-It for pgsql-hackers@arkaria.postgresql.org; Thu, 06 May 2021 19:22:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lejZZ-00009x-Au for pgsql-hackers@lists.postgresql.org; Thu, 06 May 2021 19:22:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lejZX-0004cN-By for pgsql-hackers@lists.postgresql.org; Thu, 06 May 2021 19:22:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 146JM2864175343; Thu, 6 May 2021 15:22:02 -0400 From: Tom Lane To: Andres Freund cc: Robert Haas , vignesh C , Bharath Rupireddy , Craig Ringer , Peter Eisentraut , PostgreSQL Hackers Subject: Re: Printing backtrace of postgres processes In-reply-to: <20210506191406.hwafwkr4gs2vougq@alap3.anarazel.de> References: <20210127170958.vzo33jzmqwhmn7z6@alap3.anarazel.de> <3886673.1612337426@sss.pgh.pa.us> <20210506191406.hwafwkr4gs2vougq@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 06 May 2021 12:14:06 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4175341.1620328922.1@sss.pgh.pa.us> Date: Thu, 06 May 2021 15:22:02 -0400 Message-ID: <4175342.1620328922@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2021-05-06 14:38:51 -0400, Robert Haas wrote: >> On Wed, Feb 3, 2021 at 2:30 AM Tom Lane wrote: >>> This point is entirely separate from the question of whether >>> triggering stack traces at inopportune moments could cause system >>> malfunctions, but that question is also not to be ignored. > I think that ship kind of has sailed with > > commit 71a8a4f6e36547bb060dbcc961ea9b57420f7190 > Author: Alvaro Herrera > Date: 2019-11-08 15:44:20 -0300 > Add backtrace support for error reporting The fact that we have a scarily large surface area for that to cause problems is not a great argument for making the surface area even larger. Also, I don't think v13 has been out long enough for us to have full confidence that the backtrace behavior doesn't cause any problems already. > we allow generating backtraces in all kind of places, including > e.g. some inside critical sections via backtrace_functions. If there's an elog call inside a critical section, that seems like a problem already. Are you sure that there are any such? regards, tom lane