Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TbAPe-0004kB-CR for pgsql-bugs@postgresql.org; Wed, 21 Nov 2012 13:32:22 +0000 Received: from szxga01-in.huawei.com ([119.145.14.64]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TbAPU-0004Ok-J8 for pgsql-bugs@postgresql.org; Wed, 21 Nov 2012 13:32:22 +0000 Received: from 172.24.2.119 (EHLO szxeml209-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id ATF23622; Wed, 21 Nov 2012 21:32:07 +0800 (CST) Received: from SZXEML457-HUB.china.huawei.com (10.82.67.200) by szxeml209-edg.china.huawei.com (172.24.2.184) with Microsoft SMTP Server (TLS) id 14.1.323.3; Wed, 21 Nov 2012 21:32:05 +0800 Received: from blrprnc07ns (10.18.96.96) by szxeml457-hub.china.huawei.com (10.82.67.200) with Microsoft SMTP Server id 14.1.323.3; Wed, 21 Nov 2012 21:32:06 +0800 From: Hari Babu To: "'Tom Lane'" CC: References: <10253.1353353527@sss.pgh.pa.us> <005201cdc6d7$fb988f00$f2c9ad00$@kommi@huawei.com> <14768.1353445229@sss.pgh.pa.us> In-Reply-To: <14768.1353445229@sss.pgh.pa.us> Subject: Re: BUG #7643: Issuing a shutdown request while server startup leads to server hang Date: Wed, 21 Nov 2012 19:02:03 +0530 Message-ID: <003201cdc7ec$982ae650$c880b2f0$@kommi@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac3HYhUzTnvF3/oxQLyyG6MD+lwE8AAcK4Ug Content-Language: en-us X-Originating-IP: [10.18.96.96] X-CFilter-Loop: Reflected X-Pg-Spam-Score: -3.5 (---) X-Archive-Number: 201211/170 X-Sequence-Number: 34728 Tom Lane writes: >I concluded that it probably wasn't a good idea to have the additional state transition in SIGINT handling. Generally >PM_STARTUP means "we're running the startup process and nothing else", and that's useful state info that we shouldn't >throw away lightly. I tested the patch, it is working fine. I have a query regarding the changing of pmState only incase of SIGTERM but not incase of SIGINT. Is there any reason to handle like this? or Is it ok to modify the handling of pmState in SIGTERM same as SIGINT? Regards, Hari babu.