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 1leTWC-0002La-Tl for pgsql-hackers@arkaria.postgresql.org; Thu, 06 May 2021 02:13:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1leTWB-0005bo-Sd for pgsql-hackers@arkaria.postgresql.org; Thu, 06 May 2021 02:13:35 +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 1leTWB-0005bG-Gk for pgsql-hackers@lists.postgresql.org; Thu, 06 May 2021 02:13:35 +0000 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1leTW4-0004Cz-HU for pgsql-hackers@lists.postgresql.org; Thu, 06 May 2021 02:13:34 +0000 Received: by mail-io1-xd2e.google.com with SMTP id b10so3497871iot.4 for ; Wed, 05 May 2021 19:13:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JS40eSTUXR31OcU2D5ZhSlB/0dd8mWzZS6sD0XVVYdE=; b=ME1BctrMM+sDbWU4A0FxcA4Qiqo6uP5Zc0XMbmeab3mK53Atcu2OU/3jqc9VbuxTpQ 8F1MW8d/3kNkBI7fD1YJq5b+e0rXE62pweblxamYMNTuqOCccKh2ietoacmjXy/wT7Ol a/cKHME3Rd3Bp0Jzo3ZS4ZRuHI47idDx5grBsOuxsmYXvYTV5pv6i8me3SpKKUqtFXPk icriR1nuLCjUBpreb4XfL5HGiuICGfFXhW98QvRgIPDiU8uRd36EYyRXAQ0xDvg/yWyh Kcn/d91iDGS4JKqltjjWm0FRdWZ5I9W6MI6Y86Vf8Z2oE4CC2DoDQ3d6MHE8NSHkD89o I2rw== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JS40eSTUXR31OcU2D5ZhSlB/0dd8mWzZS6sD0XVVYdE=; b=WD+QY8p4YzLjR5QZgQXKWMk8bmuLVbIw1d6l4MaglxSlPOrsQjRUbLpgI2/wWITFid o83WigsxVK8e5viGR7ehzBiXYc4iuukWKUbiFePNP3/T1QlqODykPPTipuEAa6Rw/SBd RQYdLK7jIOshnxWz9LbMj3TRHVkNUkJWe89aALJUbe5FWWtzfm+1fFuhc6ZnlHbsG2ZJ 4iiEPU+lMRf5SS1o2Bm9Br2a7ykunGsv4yX+Yn8kxwSDbBpKRce605fA1w764oWEqiJ1 IdN8//4vfrA/p1Be5wi3C+LwudsOrgPWm+E7kBCmnTTTHkQFpJUVJz+7jMp9eoDsfYZp yooQ== X-Gm-Message-State: AOAM531sSn1XcJ7VkcNpVxuoIGXPPSA7Z/0jvFTRNCm0sdeiC4+/HrWu 0L5vuSTjiA94oyluovU72Sy0Tw== X-Google-Smtp-Source: ABdhPJxOT3tuiod74yfndewkSKUhOt9JL3jtH8173sRxH//4ITGFFRTyP6Twt4maOxfrPaaYaiBQ9Q== X-Received: by 2002:a02:211c:: with SMTP id e28mr1544373jaa.39.1620267206180; Wed, 05 May 2021 19:13:26 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id r11sm613094ilq.29.2021.05.05.19.13.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 May 2021 19:13:25 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id A67B980090D; Wed, 5 May 2021 21:13:24 -0500 (CDT) Date: Wed, 5 May 2021 21:13:24 -0500 From: Justin Pryzby To: vignesh C Cc: Bharath Rupireddy , Tom Lane , Andres Freund , Craig Ringer , Robert Haas , Peter Eisentraut , pgsql-hackers@lists.postgresql.org Subject: Re: Printing backtrace of postgres processes Message-ID: <20210506021324.GD27406@telsasoft.com> References: <3886673.1612337426@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Here's a cleaned-up copy of the doc text. Send a request to the backend with the specified process ID to log its backtrace. The backtrace will be logged at message level LOG. It will appear in the server log based on the log configuration set (See for more information), but will not be sent to the client regardless of . A backtrace will identify where exactly the backend process is currently executing. This may be useful to developers to diagnose stuck processes and other problems. This feature is not supported for the postmaster, logger, or statistics collector process. This feature will be available if PostgreSQL was built with the ability to capture backtracee. If not available, the function will return false and show a WARNING. Only superusers can request backends to log their backtrace. > - * this and related functions are not inlined. > + * this and related functions are not inlined. If edata pointer is valid > + * backtrace information will set in edata. will *be* set -- Justin