Re: How to check postgres running or not ? - Mailing list pgsql-sql

From Worik
Subject Re: How to check postgres running or not ?
Date
Msg-id 414E2C82.6050208@noggon.com
Whole thread Raw
In response to Re: How to check postgres running or not ?  (Jeff Eckermann <jeff_eckermann@yahoo.com>)
Responses Re: How to check postgres running or not ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Perhaps I have a bug in pg_ctrl?

This is what I get...

worik@stolberg:~$ ps aux | grep postmaster | grep -v grep 
;/usr/lib/postgresql/bin/pg_ctl status
postgres   670  0.0  0.6  8544 1688 pts/1    S    12:33   0:00 
/usr/lib/postgresql/bin/postmaster
pg_ctl: postmaster or postgres is not running
worik@stolberg:~$

cheers
Worik

Jeff Eckermann wrote:
> --- Christopher Browne <cbbrowne@acm.org> wrote:
> 
> 
>>In an attempt to throw the authorities off his
>>trail, sgaikwad@vertex.co.in ("Sandeep Gaikwad")
>>transmitted:
>>
>>>Hello Sir,
>>>                I want to know how to check
>>
>>whether postgres database
>>
>>>is running or not ? when  I give command like
>>
>>./postmaster -i &,
>>
>>>whether all databases in that postgres will run or
>>
>>any one [default] ? 
>>
>>>If any one, then how to detect that database ?
> 
> 
> The "standard" way would be "pg_ctl status".  "man
> pg_ctl" is recommended reading for anyone
> administering a PostgreSQL setup.
> 
> 
>>Well, the way I usually check on what databases are
>>running is thus:
>>
>>cbbrowne@wolfe:/tmp/mm5/doc> netstat -an | grep PG  
>>                                                    
>>                                 Saturday 13:18:30
>>unix  2      [ ACC ]     STREAM     LISTENING    
>>2793 /var/run/postgresql/.s.PGSQL.5432
>>
>>One could presumably script things further to get
>>more out of that; it
>>doesn't normally seem worthwhile to do so...
>>-- 
>>output = ("cbbrowne" "@" "ntlug.org")
>>http://www.ntlug.org/~cbbrowne/postgresql.html
>>"As long as war is regarded as wicked, it will
>>always have
>> its fascination.  When it is looked upon as vulgar,
>> it will cease to be popular."
>>    --Oscar Wilde
>>
>>---------------------------(end of
>>broadcast)---------------------------
>>TIP 2: you can get off all lists at once with the
>>unregister command
>>    (send "unregister YourEmailAddressHere" to
>>majordomo@postgresql.org)
>>
> 
> 
> 
> 
>         
> _______________________________
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
> 
> 
> 


pgsql-sql by date:

Previous
From: Greg Stark
Date:
Subject: Re: ORDER BY and NULLs
Next
From: Tom Lane
Date:
Subject: Re: How to check postgres running or not ?