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 1kjYfw-00044S-SE for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Nov 2020 02:12:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kjYfu-0002NT-G3 for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Nov 2020 02:12:22 +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 1kjYfu-0002NL-9D for pgsql-hackers@lists.postgresql.org; Mon, 30 Nov 2020 02:12:22 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kjYfq-00059Z-Of for pgsql-hackers@postgresql.org; Mon, 30 Nov 2020 02:12:21 +0000 Received: from hnk.local (sp1-75-203-180.msb.spmode.ne.jp [1.75.203.180]) by oss.nttdata.com (Postfix) with ESMTPSA id 095FF6233A; Mon, 30 Nov 2020 11:12:13 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com Subject: Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module To: Bharath Rupireddy Cc: Craig Ringer , PostgreSQL-development , Robert Haas References: <069fb3bc-3907-4d85-19fd-e4b2d2f004b4@oss.nttdata.com> <1ae40b1b-2f42-4510-1514-40bb7d7255ab@oss.nttdata.com> <3f292fbb-f155-9a01-7cb2-7ccc9007ab3f@oss.nttdata.com> <9e3f88cd-0cc4-ac9e-4102-505ac8213fc9@oss.nttdata.com> From: Fujii Masao Message-ID: <1afcd216-fb87-c9b0-d97b-7bba856dcf91@oss.nttdata.com> Date: Mon, 30 Nov 2020 11:12:13 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020/11/27 16:47, Bharath Rupireddy wrote: > On Fri, Nov 27, 2020 at 12:26 PM Fujii Masao > wrote: >> >>> > > When I read the patch again, I found that, with the patch, the shutdown >>> > > of worker_spi causes to report the following FATAL message. >>> > > >>> > > FATAL: terminating connection due to administrator command >>> > > >>> > > Isn't this message confusing because it's not a connection? If so, >>> > > we need to update ProcessInterrupts() so that the proper message is >>> > > reported like other bgworkers do. >>> > > >>> > >>> > This is also true for all the bgworker that use the die() handler. How about doing it the way bgworker_die() does in ProcessInterrupts()? This would give meaningful information. Thoughts? If okay, I can make a separate patch. >>> > >>> >>> Attaching the patch that improved the message for bg workers in ProcessInterrupts(). For instance, now it looks like *FATAL: terminating background worker "worker_spi" due to administrator command* or *FATAL: terminating background worker "parallel worker" due to administrator command *and so on for other bg workers.* >>> * >>> >>> Please review the patch. >> >> Thanks for the patch! It looks good to me. >> > > Thanks! Pushed. Thanks! Since all the patches that proposed in this thread were committed, I marked the CF entry as committed. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION