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 1hUC0H-0002ic-SP for pgsql-hackers@arkaria.postgresql.org; Fri, 24 May 2019 15:21:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hUC0F-0005db-OD for pgsql-hackers@arkaria.postgresql.org; Fri, 24 May 2019 15:21:03 +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 1hUC0F-0005dT-CL for pgsql-hackers@lists.postgresql.org; Fri, 24 May 2019 15:21:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hUC0D-0000bs-Ac for pgsql-hackers@postgresql.org; Fri, 24 May 2019 15:21:02 +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 x4OFKqZX016008; Fri, 24 May 2019 11:20:52 -0400 From: Tom Lane To: Peter Eisentraut cc: Alvaro Herrera , Robert Haas , David Rowley , Amit Langote , Amit Langote , Jesper Pedersen , Rajkumar Raghuwanshi , Beena Emerson , amul sul , "pgsql-hackers@postgresql.org" , Dilip Kumar Subject: Re: [HACKERS] Runtime Partition Pruning In-reply-to: References: <20180410213203.nl645o5vj5ap66sl@alvherre.pgsql> Comments: In-reply-to Peter Eisentraut message dated "Fri, 24 May 2019 16:50:04 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <16006.1558711252.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Fri, 24 May 2019 11:20:52 -0400 Message-ID: <16007.1558711252@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Eisentraut writes: > On 2018-04-10 23:32, Alvaro Herrera wrote: >> To figure out, I used the attached patch (not intended for application) >> to add a backtrace to each log message, plus a couple of accusatory >> elog() calls in relation_open and ExecSetupPartitionPruneState. > What do people think about adding something like this errbacktrace() > from Álvaro's patch to core PostgreSQL? If we could devise a way to > selectively enable it, it might be an easier way for users to provide > backtraces from errors. I think we did discuss it right after that, or somewhere nearby, and concluded that the output is so imprecise that it's not really going to be worth whatever portability issues we'd have to deal with. I'd be all for a better version, but glibc's backtrace() just sucks, at least given our coding style with lots of static functions. regards, tom lane