Thread
-
Re: documentation udpates to pgupgrade.html
Colin 't Hart <colinthart@gmail.com> — 2010-09-29T14:21:17Z
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 -
Re: documentation udpates to pgupgrade.html
Massa, Harald Armin <chef@ghum.de> — 2010-09-29T17:26:56Z
Colin, > To query for Postgresql services on Windows use: > > sc query type= service | find "postgresql" > sad news is that (at least on my computer) it only finds running services. Harald -- GHUM GmbH Harald Armin Massa Spielberger Straße 49 70435 Stuttgart 0173/9409607 Amtsgericht Stuttgart, HRB 734971 - persuadere. et programmare
-
Re: documentation udpates to pgupgrade.html
Colin 't Hart <colinthart@gmail.com> — 2010-09-29T18:27:11Z
Oops. Apparently type= service is the default, so we can remove that bit. Then we should add state= all. The default = active, a third option = inactive. So: sc query state= all should list all services, in all states. And then we pipe to find which is the Windows equivalent of grep, but it needs to have its parameter in double quotes. So: sc query state= all | find "postgresql" Regards, Colin On 29 September 2010 19:26, Massa, Harald Armin <chef@ghum.de> wrote: > Colin, > >> >> To query for Postgresql services on Windows use: >> >> sc query type= service | find "postgresql" > > sad news is that (at least on my computer) it only finds running services. > > Harald > > -- > GHUM GmbH > Harald Armin Massa > Spielberger Straße 49 > 70435 Stuttgart > 0173/9409607 > > Amtsgericht Stuttgart, HRB 734971 > - > persuadere. > et programmare >