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 1kyzY1-0002Qj-VT for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Jan 2021 15:56:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kyzY0-0005HF-2Y for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Jan 2021 15:56:00 +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 1kyzXz-0005Fk-Sj for pgsql-bugs@lists.postgresql.org; Mon, 11 Jan 2021 15:55:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyzXx-0001ir-Nq for pgsql-bugs@lists.postgresql.org; Mon, 11 Jan 2021 15:55:59 +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 10BFtUoF865795; Mon, 11 Jan 2021 10:55:30 -0500 From: Tom Lane To: bchen90@163.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16817: kill process cause postmaster hang In-reply-to: <16817-d23e3a1a027133d5@postgresql.org> References: <16817-d23e3a1a027133d5@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 11 Jan 2021 15:10:42 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <865793.1610380530.1@sss.pgh.pa.us> Date: Mon, 11 Jan 2021 10:55:30 -0500 Message-ID: <865794.1610380530@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > Recently we encountered a problem that after killed walwriter, we expect > the database can recover normally, but it not (the postmaster hang in the > stat of 'wait dead end', and the archiver does't exit). > After analysis this problem, we found it could be a bug for a long time. > for archiver now use 'system' to call the configed archive command. For > 'system' the linux programmer's manual describe the following 'During > execution of the command, SIGCHLD will be blocked, and SIGINT and SIGQUIT > will be ignored'. > So, when a child chrash, we now just SIGQUIT the archiver just one time, > while the archiver just execute 'system', SIGQUIT will be ignored, then the > posmaster hang in stat of 'wait dead end'. Not sure I believe this: why wouldn't the SIGKILL-after-5-seconds logic get us out of that situation? regards, tom lane