From: | Frank Seesink <frank(at)mail(dot)wvnet(dot)edu> |
---|---|
To: | pgsql-cygwin(at)postgresql(dot)org |
Subject: | Re: Deinstall "postmaster" as NT service |
Date: | 2003-09-21 20:31:49 |
Message-ID: | bkl1rr$h0$1@sea.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-cygwin |
stephan(dot)michael(dot)rupp(at)t-online(dot)de wrote:
> Hello, all,
>
> as I have "postmaster" already in the NT (Win2K) services list due to a previous (faulty)
> installation of PostgreSQL, I cannot successfully restart "postmaster" as NT service:
>
> The command:
>
> bash-2.05b$ cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D
> /usr/share/postgresql/data -i" --dep ipc-daemon2 --termsig INT --user postgres --shutdown
>
> quits with the error message:
> cygrunsrv: Error installing a service: OpenService: Win32 error 1073:
> Der angegebene Dienst ist bereits vorhanden.
>
> How to deinstall "postmaster" as NT service or to delete it from the NT services list?
...
____________________________________________________________
SHORT ANSWER
$ cygrunsrv --remove postmaster
to remove the NT service. Then do the command you wrote above (or some
variation of it) to install postmaster new.
____________________________________________________________
COMMENTS
Something to note, however. Not sure when you say you 'faulty' if you
mean that you typed the initial $ cygrunsrv command incorrectly (e.g.,
with incorrect switches, etc.), or simply that you had issues with
PostgreSQL due to something like the NT username/password that you are
running postmaster under.
Note if you change the NT user and/or password that you run postmaster
under, simply bring up your Service Manager (I tend to right-click on
'My Computer' and choose 'Manage' from the popup menu, but there's about
1/2 dozen ways to get there), double-click on the postmaster service to
bring up its properties, cick the 'Log On' tab, and change the
username/password as needed.
In most cases, you do NOT need to remove and reinstall the NT service.
Note that Windows NT services are basically just Registry entries.
That is, once you've done the cygrunsrv command you listed above,
Windows knows that when you start/stop/restart the NT service
'postmaster', it needs to go to a specific directory and fire
up/shutdown/kick a specific executable. Kinda like a BATch file.
In Unix-speak, they're kinda like your initscripts. For example, just
because you update your installation of PostgreSQL on Linux, you don't
need to remove/reinsert any commands you have in your initscripts,
right? (assuming paths remain the same, of course :-) ) Well, same
deal here. Once you've done the cygrunsrv command to 'hook in'
PostgreSQL as an NT service, you should not need to re-do this command
in the future. The ONLY time you may need to do so is if you need to
change the parameters you listed when you ran cygrunsrv (e.g., you want
to change the path to the data store listed after -D).
From | Date | Subject | |
---|---|---|---|
Next Message | Frank Seesink | 2003-09-22 00:18:26 | Re: Leftover PID files |
Previous Message | Seth Rubin | 2003-09-20 17:39:11 | Re: Deinstall "postmaster" as NT service |