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

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, 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 19:33:05
Message-ID: 58c9854f-fa1c-e5df-3b8e-0c36a912c836@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 3/4/21 2:08 PM, Andres Freund wrote:
> [...] pgwin32_is_service() doesn't actually reliably detect if running as
> a service - it's a heuristic that also triggers when running postgres
> within a windows docker container (presumably because that itself is run
> from within a service?).
>
>
> ISTM that that's a problem, and is likely to become more of a problem
> going forward (assuming that docker on windows will become more
> popular).
>
>
> My opinion is that the whole attempt at guessing whether we are running
> as a service is a bad idea. This isn't the first time to be a problem,
> see e.g. [1].
>
> Why don't we instead have pgwin32_doRegister() include a parameter that
> indicates we're running as a service and remove all the heuristics?

I assume you mean a postmaster parameter, that would be set via pg_ctl?
Seems reasonable.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2021-03-04 19:45:37 Re: PROXY protocol support
Previous Message Dian M Fay 2021-03-04 19:29:47 Re: [PATCH] postgres-fdw: column option to override foreign types