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 1maAA2-0005DO-Kb for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Oct 2021 05:17:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1maAA1-0007lw-Io for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Oct 2021 05:17:09 +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 1maAA1-0007lo-AC for pgsql-hackers@lists.postgresql.org; Tue, 12 Oct 2021 05:17:09 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1maA9y-0001U8-Mi for pgsql-hackers@lists.postgresql.org; Tue, 12 Oct 2021 05:17:08 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 5658460EB1; Tue, 12 Oct 2021 14:17:03 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.3 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 12 Oct 2021 14:17:03 +0900 From: bt21tanigaway To: vignesh21@gmail.com Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Printing backtrace of postgres processes User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: bt21tanigaway@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, > The previous patch was failing because of the recent test changes made > by commit 201a76183e2 which unified new and get_new_node, attached > patch has the changes to handle the changes accordingly. > Thanks for your update! > I have two comments. 1.Do we need “set_backtrace(NULL, 0);” on “HandleMainLoopInterrupts()”? I could observe that it works correctly without this. It is written on “HandleAutoVacLauncherInterrupts” as well, but I think it is necessary to prevent delays as well as [1]. 2.The patch seems to forget to handle “ereport(LOG,(errmsg("logging backtrace of PID %d", MyProcPid)));” on “HandleAutoVacLauncherInterrupts” and “HandleMainLoopInterrupts()”. I think it should be the same as the process on “ProcessInterrupts()”. 3.How about creating a new function. Since the same process is on three functions( “ProcessInterrupts()”, “HandleAutoVacLauncherInterrupts”, “HandleMainLoopInterrupts()” ), I think it’s good to create a new function. [1] https://commitfest.postgresql.org/35/3342/ Regards, Koyu Tanigawa