pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: 趙明春 <mzhao@insight-tec.co.jp>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #15076: postmaster crashes unexpectedly when using up arrow key in psql command
Date: Thu, 22 Feb 2018 10:12:22 -0500
Message-ID: <1402.1519312342@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGwivJF=0Fga6tjdeh+1p4mQAgHNp1azf1SmgkTrUPfY0dR8Vg@mail.gmail.com>
References: <151926215049.3890.7661985951683590330@wrigleys.postgresql.org>
	<CAKFQuwa9r_P+zminmPFJAs2nydDAmTD8Dvzx4EUcUpdQE_-Lgg@mail.gmail.com>
	<18417.1519272409@sss.pgh.pa.us>
	<CAGwivJEMLYMnt05QrU9Gx=SDLFEZ-AZb-LhThijes2S93yv+uQ@mail.gmail.com>
	<20180222075754.GD3370@paquier.xyz>
	<CAGwivJF=0Fga6tjdeh+1p4mQAgHNp1azf1SmgkTrUPfY0dR8Vg@mail.gmail.com>

=?UTF-8?B?6LaZ5piO5pil?= <mzhao@insight-tec.co.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




view thread (12+ messages)  latest in thread

Message-ID: <1402.1519312342@sss.pgh.pa.us>
Permalink:  ../1402.1519312342@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1402.1519312342@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mzhao@insight-tec.co.jp, michael@paquier.xyz, david.g.johnston@gmail.com
  Subject: Re: BUG #15076: postmaster crashes unexpectedly when using up arrow key in psql command
  In-Reply-To: <1402.1519312342@sss.pgh.pa.us>
  References: <151926215049.3890.7661985951683590330@wrigleys.postgresql.org> <CAKFQuwa9r_P+zminmPFJAs2nydDAmTD8Dvzx4EUcUpdQE_-Lgg@mail.gmail.com> <18417.1519272409@sss.pgh.pa.us> <CAGwivJEMLYMnt05QrU9Gx=SDLFEZ-AZb-LhThijes2S93yv+uQ@mail.gmail.com> <20180222075754.GD3370@paquier.xyz> <CAGwivJF=0Fga6tjdeh+1p4mQAgHNp1azf1SmgkTrUPfY0dR8Vg@mail.gmail.com> <1402.1519312342@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox