Re: Problems with "-w" option on pg_ctl.exe running as a windows

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Steve McWilliams <smcwilliams(at)EmprisaNetworks(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Problems with "-w" option on pg_ctl.exe running as a windows
Date: 2004-12-21 18:07:02
Message-ID: 200412211807.iBLI72307263@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches


Looking at the two patches I just applied I think it might fix your
problem. The problem was actually the general problem of pg_ctl -w start
not returning a non-zero.

---------------------------------------------------------------------------

Steve McWilliams wrote:
> Hello,
>
> I tried sending this the other week but for some reason it hasn't gone
> through, so I am resending:
>
> I am using Postgresql-8.0.0beta4 on Windows XP Pro and have noticed that
> attempts to run pg_ctl as a service fail when the "-w" option is included.
> So if I register the service as follows:
>
> pg_ctl.exe -N my_svc -w -U my_user -P my_pword -D my_dir -o "-i -p 15432"
>
> then try to start the service via the GUI service manager panel, it pops
> up an error dialog saying the service started but then stopped
> immediately. If I remove the "-w" option from the above line when it is
> registered, then I am able to start the service just file.
>
> The usage documentation for pg_ctl indicates you are supposed to be able
> to include the "-w" option when you register it as a service. I would
> like to be able to use it, so that when Windows launches postgres, it is
> not declared to be in the fully running state prematurely. We have
> another service that we launch which declares a dependency on postgres,
> however that dependency declaration is meaningless if postgres announces
> that it is fully running before it is truly able to accept clients.
>
> Any suggestions? For a temporary work around I have hacked my pg_ctl.c to
> wait 5 seconds before declaring the service to be in the running state.
> Thanks in advance.
>
> Steve McWilliams
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-12-21 18:57:31 Re: BUG #1329: Bug in IF-ELSEIF-ELSE construct
Previous Message j6m 2004-12-21 17:59:36 Re: Polymorphism resgression test fails when BLCKSZ changed

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-12-21 18:57:31 Re: BUG #1329: Bug in IF-ELSEIF-ELSE construct
Previous Message Bruce Momjian 2004-12-21 17:56:59 Re: [BUGS] Problems with "-w" option on pg_ctl.exe running as a windows