Skip site navigation (1) Skip section navigation (2)

Re: documentation udpates to pgupgrade.html

From: "Colin 't Hart" <colinthart(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: documentation udpates to pgupgrade.html
Date: 2010-09-29 14:21:17
Message-ID: AANLkTikr3-57jMVNi717TXiTTqOm3ipR+c90AEefXmNa@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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

Responses

pgsql-hackers by date

Next:From: Tatsuo IshiiDate: 2010-09-29 14:22:56
Subject: Unable to generate man pages for translated sgml
Previous:From: Alvaro HerreraDate: 2010-09-29 14:17:19
Subject: Re: operator dependency of commutator and negator

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group