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 1hUCkp-0004jH-6o for pgsql-hackers@arkaria.postgresql.org; Fri, 24 May 2019 16:09:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hUCkn-00076g-O6 for pgsql-hackers@arkaria.postgresql.org; Fri, 24 May 2019 16:09:09 +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 1hUCkn-00076Z-8y for pgsql-hackers@lists.postgresql.org; Fri, 24 May 2019 16:09:09 +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 1hUCkk-0001cV-PR for pgsql-hackers@postgresql.org; Fri, 24 May 2019 16:09:08 +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 x4OG8vfb017882; Fri, 24 May 2019 12:08:57 -0400 From: Tom Lane To: Andres Freund cc: Peter Eisentraut , 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: <20190524155818.wakkacerpl6yjguf@alap3.anarazel.de> References: <20180410213203.nl645o5vj5ap66sl@alvherre.pgsql> <16007.1558711252@sss.pgh.pa.us> <16535.1558712098@sss.pgh.pa.us> <20190524155818.wakkacerpl6yjguf@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Fri, 24 May 2019 08:58:18 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17880.1558714137.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 24 May 2019 12:08:57 -0400 Message-ID: <17881.1558714137@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2019-05-24 11:34:58 -0400, Tom Lane wrote: >> Hmm, after some digging in the archives, the closest thing I can find >> is this thread: >> https://www.postgresql.org/message-id/flat/CAMsr%2BYGL%2ByfWE%3DJvbUbnp= WtrRZNey7hJ07%2BzT4bYJdVp4Szdrg%40mail.gmail.com >> where we discussed using libunwind instead, but people didn't like >> the extra dependency. > Hm, I didn't actually see that much concern about that. I still think we > should just go for libunwind. Is it actually better? The basic problem with backtrace() is that it only knows about global functions, and so reports call sites in static functions as if they were in whatever global function physically precedes the static one. I think doing materially better requires depending on debug symbols, which (at least in the Red Hat world) aren't going to be there in a typical production situation. regards, tom lane