From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Andres Freund <andres@anarazel.de>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Dave Page <dpage@pgadmin.org>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Subject: Re: CI/windows docker vs "am a service" autodetection on windows
Date: Thu, 4 Mar 2021 18:04:03 -0300
Message-ID: <20210304210403.GA20642@alvherre.pgsql> (raw)
In-Reply-To: <20210304204859.65z6ynqicmlobi7r@alap3.anarazel.de>
On 2021-Mar-04, Andres Freund wrote:
> > > There does seem to be isatty(), so we could improve the case of
> > > pg_ctl/postgres run interactively without breaking a sweat. And there is
> > > fstat() too, so if stderr in a service is something distinguishable...
> >
> > We seem to have used that at some point, but commit
> > a967613911f7ef7b6387b9e8718f0ab8f0c4d9c8 got rid of it...
>
> Hm. The bug #13592 referenced in that commit appears to be about
> something else. Looks to be #13594
> https://postgr.es/m/20150828104658.2089.83265%40wrigleys.postgresql.org
Yeah, that's a typo in the commit message.
> > But maybe apply it in a combination.
>
> Yea, that's what I was thinking.
That makes sense. At the time we were not thinking (*I* was not
thinking, for sure) that you could have a not-a-service process that
runs inside a service. The fixed bug was in the same direction that you
want to fix now, just differently: the bare "isatty" test was
considering too many things as under a service, and replaced it with the
pgwin32_is_service which considers a different set of too many things as
under a service. I agree with the idea that *both* tests have to pass
in order to consider it as under a service.
--
Álvaro Herrera 39°49'30"S 73°17'W
"No hay hombre que no aspire a la plenitud, es decir,
la suma de experiencias de que un hombre es capaz"
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-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, andres@anarazel.de, magnus@hagander.net, michael@paquier.xyz, dpage@pgadmin.org, andrew@dunslane.net, thomas.munro@gmail.com, heikki.linnakangas@iki.fi
Subject: Re: CI/windows docker vs "am a service" autodetection on windows
In-Reply-To: <20210304210403.GA20642@alvherre.pgsql>
* 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