Re: How to check postgres running or not ?

From: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to check postgres running or not ?
Date: 2004-09-19 16:08:18
Message-ID: 20040919160818.58480.qmail@web20825.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


--- Christopher Browne <cbbrowne(at)acm(dot)org> wrote:

> In an attempt to throw the authorities off his
> trail, sgaikwad(at)vertex(dot)co(dot)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(at)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(at)postgresql(dot)org)
>


_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jean-Luc Lachance 2004-09-19 16:19:55 Re: ORDER BY and NULLs
Previous Message terry 2004-09-19 15:17:31 Re: ORDER BY and NULLs