From: Seva Zaslavsky <szaslavsky@mpcapitallp.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18958: "pg_ctl start" allows subsequent CTRL-C key in cmd.exe to unexpectedly terminate cluster on Windows
Date: Fri, 13 Jun 2025 15:50:11 -0400
Message-ID: <b5ccf81a-f521-4626-a23b-32d8a7264abe@mpcapitallp.com> (raw)
In-Reply-To: <CAKFQuwZFtNjfb-x4FtMyWJDTacQGaifSVpL6X8iSnRuAw6HqXQ@mail.gmail.com>
References: <18958-e398048dd0cdad11@postgresql.org>
<CAKFQuwZZqJdJHdgDqnrcYTsVQWh7MpRR3qNLCqOgp_780TFo1A@mail.gmail.com>
<076f46d6-edfd-44a0-b8a7-69ee0313a6f4@mpcapitallp.com>
<CAKFQuwZFtNjfb-x4FtMyWJDTacQGaifSVpL6X8iSnRuAw6HqXQ@mail.gmail.com>
All of the behavior I've described in the original bug post regarding
CTRL-C terminating the cluster is present in 13.18 - hence contrary to
what I asserted earlier, there is no "significant behavior change since
PG 13.18."
However, the pg_ctl start "--log=filename" option only affects stdout
and stderr.
I'm still observing the behavior that pressing CTRL-C inside cmd.exe
terminates the cluster that was started inside that cmd.exe.
According to the documentation for pg_ctl "The server is started in the
background, and its standard input is attached to |/dev/null| (or |nul|
on Windows)." but if pressing CTRL-C in a cmd.exe window terminates the
cluster that was started inside that cmd.exe window, doesn't it seem
like stdin is attached to the output cmd.exe and not to NUL?
Is it the expected behavior that pressing CTRL-C will terminate the
cluster that was started inside that cmd.exe on windows?
On 6/13/2025 10:58 AM, David G. Johnston wrote:
> On Fri, Jun 13, 2025 at 7:51 AM Seva Zaslavsky
> <szaslavsky@mpcapitallp.com> wrote:
>
> Using the -l flag with "pg_ctl start" resolves this issue. This
> was a significant behavior change since PG 13.18.
>
>
> I don't recall this changing recently...the documentation hasn't at
> least...
>
> David - Thank you for the quick response. Would appreciate if you
> have any thoughts on another logging bug (or behavior change since
> PG 13.18) that I documented on June 11 in #18955.
>
> That seems Windows OS specific which I'm unable to review and comment
> upon.
>
> David J.
>
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: szaslavsky@mpcapitallp.com, david.g.johnston@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18958: "pg_ctl start" allows subsequent CTRL-C key in cmd.exe to unexpectedly terminate cluster on Windows
In-Reply-To: <b5ccf81a-f521-4626-a23b-32d8a7264abe@mpcapitallp.com>
* 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