Deinstall "postmaster" as NT service

Поиск
Список
Период
Сортировка
Искать

Deinstall "postmaster" as NT service

От:
stephan.michael.rupp@t-online.de
Дата:
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?

In the Win2K command reference, I didn't find anything appropriate.

Thanks in advance for your support.

Kind regards
Stephan



--

Stephan Rupp
- Philologe / Netzwerkspezialist -
Mirabeauweg 4
D-72 072  Tübingen
Tel.: +49 (7071) 84093
Fax: +49 (7071) 84048
E-Post:	stephan.rupp@gmx.net
	stephan.michael.rupp@t-online.de


Re: Deinstall "postmaster" as NT service

От:
Seth Rubin <srubin@thoughtprocess.com>
Дата:

remove it via cygrunsrv.
do:
   cygrunsrv --help

-----Original Message-----
From: pgsql-cygwin-owner@postgresql.org
[mailto:pgsql-cygwin-owner@postgresql.org]On Behalf Of
stephan.michael.rupp@t-online.de
Sent: Saturday, September 20, 2003 2:51 AM
To: pgsql-cygwin@postgresql.org
Subject: [CYGWIN] Deinstall "postmaster" as NT service


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?

In the Win2K command reference, I didn't find anything appropriate.

Thanks in advance for your support.

Kind regards
Stephan



--

Stephan Rupp
- Philologe / Netzwerkspezialist -
Mirabeauweg 4
D-72 072  Tübingen
Tel.: +49 (7071) 84093
Fax: +49 (7071) 84048
E-Post:	stephan.rupp@gmx.net
	stephan.michael.rupp@t-online.de



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Re: Deinstall "postmaster" as NT service

От:
Frank Seesink <frank@mail.wvnet.edu>
Дата:
stephan.michael.rupp@t-online.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).

FAQ