Re: BUG #15076: postmaster crashes unexpectedly when using up arrow key in psql command

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 趙明春 <mzhao(at)insight-tec(dot)co(dot)jp>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15076: postmaster crashes unexpectedly when using up arrow key in psql command
Date: 2018-02-22 15:12:22
Message-ID: 1402.1519312342@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?UTF-8?B?6LaZ5piO5pil?= <mzhao(at)insight-tec(dot)co(dot)jp> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2018-02-22 15:42:27 Re: bug in jsonb_set porstgresql 5.5
Previous Message Pascal Barbedor 2018-02-22 13:38:25 bug in jsonb_set porstgresql 5.5