Bruce,
To query for Postgresql services on Windows use:
sc query type= service | find "postgresql"
On my machine this yields:
SERVICE_NAME: postgresql-9.0
DISPLAY_NAME: postgresql-9.0 - PostgreSQL Server 9.0
NB the space after type= is very important, don't ask me why...
I prefer to use 'sc start <servicename>' and 'sc stop <servicename>',
then you can use one tool for everything.
The following shows these commands (and the query command) in action.
C:\Documents and Settings\Administrator>sc stop postgresql-9.0
SERVICE_NAME: postgresql-9.0
TYPE : 10 WIN32_OWN_PROCESS
STATE : 3 STOP_PENDING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x2
WAIT_HINT : 0x2710
C:\Documents and Settings\Administrator>sc start postgresql-9.0
SERVICE_NAME: postgresql-9.0
TYPE : 10 WIN32_OWN_PROCESS
STATE : 2 START_PENDING
(NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x7d0
PID : 3732
FLAGS :
C:\Documents and Settings\Administrator>sc query postgresql-9.0
SERVICE_NAME: postgresql-9.0
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
Hope this isn't too much info and answers all your questions :-)
Regards,
Colin
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers