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



Reply via email to