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 1kewAo-000774-IE for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Nov 2020 08: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 1kewAl-00072B-5e for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Nov 2020 08:17:07 +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 1kewAk-00071t-V3 for pgsql-hackers@lists.postgresql.org; Tue, 17 Nov 2020 08:17:06 +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 1kewAe-0007qN-3A for pgsql-hackers@postgresql.org; Tue, 17 Nov 2020 08:17:06 +0000 Received: from hnk.local (p1295030-ipngn4902funabasi.chiba.ocn.ne.jp [153.166.85.30]) by oss.nttdata.com (Postfix) with ESMTPSA id C115E623C6; Tue, 17 Nov 2020 17:16:54 +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: Kyotaro Horiguchi , PostgreSQL-development References: <20201105.121206.819769369617763972.horikyota.ntt@gmail.com> <20201110.161740.1341818036035711165.horikyota.ntt@gmail.com> <763d6041-49d3-96b2-d0ec-f56e676a5156@oss.nttdata.com> From: Fujii Masao Message-ID: <997775df-e13d-1e73-807d-08610e7e9c75@oss.nttdata.com> Date: Tue, 17 Nov 2020 17:16:52 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 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/13 20:24, Bharath Rupireddy wrote: > On Thu, Nov 12, 2020 at 10:06 AM Fujii Masao > wrote: >> >> Thanks for the analysis! I pushed the patch. >> > > Thanks! Since we are replacing custom SIGHUP and SIGTERM handlers with > standard ones, how about doing the same thing in worker_spi.c? I > posted a patch previously [1] in this mail thread. If it makes sense, > please review it. I agree to simplify the worker_spi code by making it use the standard signal handlers. But as far as I read Craig Ringer's comments upthread about worker_spi, it's not enough to just replace the dedicated SIGTERM handler with the standard one. ISTM that probably worker_spi should use the signal handler handling InterruptPending and ProcDiePending like die() does. What do you think about Craig Ringer's comments? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION