Re: PostgreSQL in Windows console and Ctrl-C

From: Christian Ullrich <chris(at)chrullrich(dot)net>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: PostgreSQL in Windows console and Ctrl-C
Date: 2014-04-15 18:29:34
Message-ID: 4dc33c745cfa4faaae02f39ce084f601@AMSPR06MB134.eurprd06.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* From: Bruce Momjian

> On Mon, Apr 14, 2014 at 09:34:14AM +0530, Amit Kapila wrote:
> > The problem can be solved this way, but the only question here is
> > whether it is acceptable for users to have a new console window for
> > server.
> >
> > Can others also please share their opinion if this fix (start server
> > in new console) seems acceptable or shall we try by passing some
> > information from pg_ctl and then ignore CTRL+C && CTRL+BREAK for it?
>
> I wanted to point out that I think this patch is only appropriate for
> head, not backpatching. Also, on Unix we have to handle signals that

Yes, of course.

> come from the kill command. Can you send CTRL+C from other applications
> on Windows?

Yes again, using GenerateConsoleCtrlEvent() you can send these events to
any (console-attached) process you have the required permissions for,
but that is not an issue for the same reason it isn't one on Unix. All
the target process sees is the event, it cannot determine (nor does it
care) where the event came from.

--
Christian

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-04-15 18:32:53 Re: pgsql: psql: conditionally display oids and replication identity
Previous Message Christian Ullrich 2014-04-15 18:23:50 Re: PostgreSQL in Windows console and Ctrl-C