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 1hpe8C-0004V9-JK for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 19:37:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpe8B-0006Yw-EX for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 19:37:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpe8B-0006W6-2o for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 19:37:55 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpe88-0003LP-EC for pgsql-hackers@postgresql.org; Mon, 22 Jul 2019 19:37:54 +0000 Received: by mail-qt1-x844.google.com with SMTP id d23so39635161qto.2 for ; Mon, 22 Jul 2019 12:37:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Y/hmILphkfQIpyLAqHYoUE6aoFULd6l7BGpISYiwe48=; b=FWr0umvBmeaTivSjxivN5AGwn+nq8pOHdGS/zdDSCXbW3mHuYeNf6JN5M3XicxEJut l2X2yjK289GKnZNqaGX6f1v/pBpgHSlnJv9qYfwdiYQk9U9oQDhCi/25jVxeuSCZxbTo LHj2Zyj0pTlu0EZyVbUECtIgC4u8yZQY+Xba6dGTnRnxs/2RuGulXZC40G10bNnlVSYq d4qJnt/yb8AEFyJvScEGDqh8/z9HReip/D8vnXGdlU3Kv3fzQf3Ct6ZIvFrsULdEFu/7 HhWa/gaFovsPjecVmID5l9ctDeR5eDykmEpCisZMBnQSKyyzKyO+9bditsxe044tdYg3 IiYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Y/hmILphkfQIpyLAqHYoUE6aoFULd6l7BGpISYiwe48=; b=ngoAq1iZzsdgt3ovWVw1qVmCQC5q2iHOwN3tlAgp80tut6LJaFC7/l4qYHSiE2QuMj yC5BcIiM66sK17DleW9TJGgLcMmwbuBWlWSvz6tSWxnJwm+jYCiNUDU5fk4lHH8ews+d W0psfxfMdxke6eqValC5mnpbmUBeHTrl/OGbhXXvXqfq9MAqKRwYPswLmwR/Uek608Ct Tj3/AacFK0K8QDnXeAQVWIMz8QTC/rNypW3mZ1Gyz7lcpWZxm147KzGOD39Hn5cIwbkL C7hWkdDZwOTwIeGaAMmVzCidrBUQpa9m5Y0FMgDalx9YcoC5tIh71HMZil8cYIc3MHTx FDYw== X-Gm-Message-State: APjAAAWQPyxlzHoZ7mOsdVBsjH7JOAQ1OVt2/XqoiVZoaAibj+ItMG0C /IoyzRVz1lx5YLe/b+l+Fsb5nA== X-Google-Smtp-Source: APXvYqzeOYTtpK2wnX0NS7CIspgF3Hizj0PXRFxgCwrgn2TE310E37NikYtorC4pe59Lz8Mq58Ml/g== X-Received: by 2002:ac8:f91:: with SMTP id b17mr50397823qtk.352.1563824271031; Mon, 22 Jul 2019 12:37:51 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([177.154.139.202]) by smtp.gmail.com with ESMTPSA id r205sm21631118qke.115.2019.07.22.12.37.50 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 12:37:50 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id EE689120D50; Mon, 22 Jul 2019 15:37:47 -0400 (-04) Date: Mon, 22 Jul 2019 15:37:47 -0400 From: Alvaro Herrera To: Peter Eisentraut Cc: pgsql-hackers , Dmitry Dolgov <9erthalion6@gmail.com>, Thomas Munro Subject: Re: errbacktrace Message-ID: <20190722193747.GA29532@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3814a094-7dcd-106b-d2ad-7ef78f563356@2ndquadrant.com> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jul-22, Peter Eisentraut wrote: > On 2019-07-09 11:43, Peter Eisentraut wrote: > > After further research I'm thinking about dropping the libunwind > > support. The backtrace()/backtrace_symbols() API is more widely > > available: darwin, freebsd, linux, netbsd, openbsd (via port), solaris, > > and of course it's built-in, whereas libunwind is only available for > > linux, freebsd, hpux, solaris, and requires an external dependency. > > Here is an updated patch without the libunwind support, some minor > cleanups, documentation, and automatic back traces from assertion failures. The only possibly complaint I see is that the backtrace support in ExceptionalCondition does not work for Windows eventlog/console ... but that seems moot since Windows does not have backtrace support anyway. +1 to get this patch in at this stage; we can further refine (esp. add Windows support) later, if need be. https://stackoverflow.com/questions/26398064/counterpart-to-glibcs-backtrace-and-backtrace-symbols-on-windows -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services