Re: Deinstall "postmaster" as NT service

Поиск
Список
Период
Сортировка
От Frank Seesink
Тема Re: Deinstall "postmaster" as NT service
Дата
Msg-id bkl1rr$h0$1@sea.gmane.org
обсуждение исходный текст
Ответ на Deinstall "postmaster" as NT service  (stephan.michael.rupp@t-online.de)
Список pgsql-cygwin
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).


В списке pgsql-cygwin по дате отправления:

Предыдущее
От: Seth Rubin
Дата:
Сообщение: Re: Deinstall "postmaster" as NT service
Следующее
От: Frank Seesink
Дата:
Сообщение: Re: Leftover PID files