Re: CI/windows docker vs "am a service" autodetection on windows

From: Andres Freund <andres(at)anarazel(dot)de>
To: Magnus Hagander <magnus(at)hagander(dot)net>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
Subject: Re: CI/windows docker vs "am a service" autodetection on windows
Date: 2021-03-04 20:48:59
Message-ID: 20210304204859.65z6ynqicmlobi7r@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2021-03-04 21:36:23 +0100, Magnus Hagander wrote:
> > I think that's a good answer for pg_ctl - not so sure about postgres
> > itself, at least once it's up and running. I don't know what lead to all
> > of this autodetection stuff, but is there the possibility of blocking on
> > whatever stderr is set too as a service?
> >
> > Perhaps we could make the service detection more reliable by checking
> > whether stderr is actually something useful?
>
> So IIRC, and mind that this is like 15 years ago, there is something
> that looks like stderr, but the contents are thrown away. It probably
> exists specifically so that programs won't crash when run as a
> service...

Yea, that'd make sense.

I wish we had tests for the service stuff, but that's from long before
there were tap tests...

> > 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

> But maybe apply it in a combination.

Yea, that's what I was thinking.

Gah, I don't really want to know anything about windows, I just want to
hack on aio with proper working CI.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2021-03-04 20:51:50 Re: [HACKERS] PATCH: Batch/pipelining support for libpq
Previous Message Magnus Hagander 2021-03-04 20:47:10 Re: PROXY protocol support