On Wed, Sep 11, 2019 at 04:15:24AM +0000, Tsunakawa, Takayuki wrote:
> From: Michael Paquier [mailto:mich...@paquier.xyz]
>> Imagine an application which relies on Postgres, still does *not* start
>> it as a service but uses "pg_ctl start"
>> automatically.  This could be triggered as part of another service startup
>> which calls say system(), or as another script.  Wouldn't that cause
>> potentially a freeze?  
> 
> Do you mean by "another service startup":
> 
> another service (Windows service)
> -> an application (not a Windows service)
>   -> pg_ctl start
> 
> Then pg_ctl runs under the Windows service environment, and the
> popup won't appear.

Yes, I meant a pg_ctl start command invoked as par of another service
startup in the way you describe it here.

>> I am also not sure that I quite understand why a
>> popup would never show up if a different service startup triggers pg_ctl
>> start by itself that fails.
> 
> I experimented it with a sample program that I showed in this
> thread.  A program invoked by a Windows services also runs in the
> service.

Okay, so this means that the service state of the parent is inherited
and that we can rely on that.  I was not sure about that.  Got it
now.  Now, there are cases where it is possible to start an app
without using a service though, no?  For example using the task
manager it is possible to trigger an app when the OS starts.  What
happens in the case where we have an app which starts Postgres using
"pg_ctl start" as part of its startup process but it fails and pops an
error window, freezing the whole?  Can this happen?  Sorry to sound
noisy, but I am rather scared of the potential consequences of this
change without a GUC to control it as Craig mentioned at the beginning
of the thread.  Perhaps that's a niche case, but it could be annoying
for some users.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to