Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iYY0C-0000ah-Jx for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Nov 2019 16:11:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iYY0A-0000IO-9H for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Nov 2019 16:11:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iYY09-0000IH-Od for pgsql-hackers@lists.postgresql.org; Sat, 23 Nov 2019 16:11:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iYY07-00023p-7j for pgsql-hackers@postgresql.org; Sat, 23 Nov 2019 16:11:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xANGB88j026477; Sat, 23 Nov 2019 11:11:08 -0500 From: Tom Lane To: Alvaro Herrera cc: Peter Eisentraut , pgsql-hackers , Dmitry Dolgov <9erthalion6@gmail.com>, Thomas Munro Subject: Re: errbacktrace In-reply-to: <20191108185246.GA17609@alvherre.pgsql> References: <20191108185246.GA17609@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 08 Nov 2019 15:52:46 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26475.1574525468.1@sss.pgh.pa.us> Date: Sat, 23 Nov 2019 11:11:08 -0500 Message-ID: <26476.1574525468@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2019-Oct-26, Peter Eisentraut wrote: >> I hadn't realized that you had already attached a patch that implements >> your idea. It looks good to me. Maybe a small comment near >> check_backtrace_functions() why we're not using a regular list. Other >> than that, please go ahead with this. > Thanks, I added that comment and others, and pushed. Let's see what > happens now ... I had occasion to try to use errbacktrace() just now, and it blew up on me. Investigation finds this: int errbacktrace(void) { ErrorData *edata = &errordata[errordata_stack_depth]; MemoryContext oldcontext; Assert(false); I suppose that's a debugging leftover that shouldn't have been committed? It did what I wanted after I took out the Assert. regards, tom lane