Re: BUG #15076: postmaster crashes unexpectedly when using up arrowkey in psql command - Mailing list pgsql-bugs

From 趙明春
Subject Re: BUG #15076: postmaster crashes unexpectedly when using up arrowkey in psql command
Date
Msg-id CAGwivJF=0Fga6tjdeh+1p4mQAgHNp1azf1SmgkTrUPfY0dR8Vg@mail.gmail.com
Whole thread Raw
In response to Re: BUG #15076: postmaster crashes unexpectedly when using up arrowkey in psql command  (Michael Paquier <michael@paquier.xyz>)
Responses Re: BUG #15076: postmaster crashes unexpectedly when using up arrow key in psql command  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Hi, Michael, Thanks. I got what you mean.

Anyway, the postmaster was received signal 2 in step 5 as below.

(1) run psql.exe in a Windows Command Prompt
(2) execute a SQL with more than one page of results, e.g. `show all;`
(3) press Ctrl + C to break it on the first page
(4) press up arrow key to try to execute the previous SQL of the step(2) again
(5) Occasionally, it will show you nothing about the SQL, then you can try to input a character ';' and press Enter key, the PostgreSQL will crash unexpectedly

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?

Best Regards,
Mingchun

-----------------------------------------------------------------------------------
 Insight Technology, Inc.  Mingchun Zhao,  趙 明春(チョウ メイシュン)
  EbisBusinessTower 5F, 1-19-19, Shibuya-ku, Tokyo
  TEL  : +81-3-5475-1452            FAX : +81-3-5475-1451
-----------------------------------------------------------------------------------


2018-02-22 16:57 GMT+09:00 Michael Paquier <michael@paquier.xyz>:
On Thu, Feb 22, 2018 at 03:57:53PM +0900, 趙明春 wrote:
> You mean that the up-arrow key operation in psql.exe may send a SIGINT(or
> SIGTERM) signal to server(postmaster) unexpectedly?

No.  What Tom means here is that you are likely mistaking what you think
is a server crash by a client crash, and that the version of libreadline
your psql version is linked to is buggy and unable to handle that
properly.  psql has no control on the server itself.
--
Michael

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #15076: postmaster crashes unexpectedly when using up arrowkey in psql command
Next
From: Christoph Berg
Date:
Subject: Re: BUG #15061: Cannot use TEMP TABLE ON COMMIT DROP in extension