Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eosZd-0001ND-CR for pgsql-bugs@arkaria.postgresql.org; Thu, 22 Feb 2018 15:14:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eosZc-0004kG-K1 for pgsql-bugs@arkaria.postgresql.org; Thu, 22 Feb 2018 15:14:16 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eosXt-0001hH-Gx for pgsql-bugs@lists.postgresql.org; Thu, 22 Feb 2018 15:12:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eosXq-0001iO-Ha for pgsql-bugs@lists.postgresql.org; Thu, 22 Feb 2018 15:12:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w1MFCMwJ001403; Thu, 22 Feb 2018 10:12:23 -0500 From: Tom Lane To: =?UTF-8?B?6LaZ5piO5pil?= cc: Michael Paquier , "David G. Johnston" , "pgsql-bugs@lists.postgresql.org" Subject: Re: BUG #15076: postmaster crashes unexpectedly when using up arrow key in psql command In-reply-to: References: <151926215049.3890.7661985951683590330@wrigleys.postgresql.org> <18417.1519272409@sss.pgh.pa.us> <20180222075754.GD3370@paquier.xyz> Comments: In-reply-to =?UTF-8?B?6LaZ5piO5pil?= message dated "Thu, 22 Feb 2018 17:24:35 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1401.1519312342.1@sss.pgh.pa.us> Date: Thu, 22 Feb 2018 10:12:22 -0500 Message-ID: <1402.1519312342@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?UTF-8?B?6LaZ5piO5pil?= writes: > So, Let me change my question: > If I started the PostgreSQL by pg_ctl command in the same Windows command > prompt, > Is it possible that pressing Ctrl + C on psql to break query(not session) > will send SIGINT to postmaster process unexpectedly? I don't know much about Windows signal processing, but the log entries you show certainly look like that's what happened. On Unix-ish machines it's normal for control-C to send a SIGINT to every process that's in the terminal's process group --- *not* just the foreground process. So if you launch the postmaster manually you'd better make sure that it gets dissociated from the terminal, or you're at risk of killing it accidentally. (Or, if you want to leave it connected to that terminal, you use another window to run psql etc.) It seems that something similar is happening on your Windows setup. I don't know the rules for process/terminal association on Windows, so I can't suggest what's the right way to do it. I will say though that most people run the postmaster as a background service on Windows, rather than launching it manually. regards, tom lane