Problems with "-w" option on pg_ctl.exe running as a service

From: "Steve McWilliams" <smcwilliams(at)EmprisaNetworks(dot)com>
To: <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Problems with "-w" option on pg_ctl.exe running as a service
Date: 2004-12-10 01:01:10
Message-ID: 1943.10.1.1.142.1102640470.squirrel@wwws.emprisanetworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

Hello,

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? Thanks in advance.

Steve McWilliams

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Steve McWilliams 2004-12-10 01:03:26 How to specify a log file when running pg_ctl as a service?
Previous Message Christophe CADIC 2004-12-09 16:32:25 Slient Install With PostgreSQL 8.0.0-rc1