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 1l0s4p-0008Q4-BV for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Jan 2021 20:21:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l0s4o-0006hX-7t for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Jan 2021 20:21:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l0s4o-0006hQ-0y for pgsql-hackers@lists.postgresql.org; Sat, 16 Jan 2021 20:21:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l0s4m-0005JB-2G for pgsql-hackers@lists.postgresql.org; Sat, 16 Jan 2021 20:21:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 10GKLV21003538; Sat, 16 Jan 2021 15:21:31 -0500 From: Tom Lane To: vignesh C cc: Andres Freund , Peter Eisentraut , PostgreSQL Hackers Subject: Re: Printing backtrace of postgres processes In-reply-to: References: <1778088.1606026308@sss.pgh.pa.us> <20201201032649.aekv5b5dicvmovf4@alap3.anarazel.de> <1361750.1606795285@sss.pgh.pa.us> <55526d79-247d-83a1-0961-7d42e0db1870@enterprisedb.com> <20210115201011.noomcygirzge43ir@alap3.anarazel.de> Comments: In-reply-to vignesh C message dated "Sat, 16 Jan 2021 23:04:52 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3536.1610828491.1@sss.pgh.pa.us> Date: Sat, 16 Jan 2021 15:21:31 -0500 Message-ID: <3537.1610828491@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk vignesh C writes: > On Sat, Jan 16, 2021 at 1:40 AM Andres Freund wrote: >> Why is a full signal needed? Seems the procsignal infrastructure should >> suffice? > Most of the processes have access to ProcSignal, for these processes > printing of callstack signal was handled by using ProcSignal. Pgstat > process & syslogger process do not have access to ProcSignal, > multiplexing with SIGUSR1 is not possible for these processes. So I > handled the printing of callstack for pgstat process & syslogger using > the SIGUSR2 signal. I'd argue that backtraces for those processes aren't really essential, and indeed that trying to make the syslogger report its own backtrace is damn dangerous. (Personally, I think this whole patch fails the safety-vs-usefulness tradeoff, but I expect I'll get shouted down.) regards, tom lane