Re: How to check postgres running or not ?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: How to check postgres running or not ?
Дата
Msg-id 200409201219.i8KCJRp05291@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: How to check postgres running or not ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Tom Lane wrote:
> At one time there was discussion of writing a "pg_ping" utility program
> to do exactly this, but it still hasn't got done.  You can fake it to
> some extent by just running "psql -l >/dev/null" and checking the exit
> code, but this does require supplying a valid username and possibly a
> password (because psql's exit code doesn't distinguish "could not
> connect" from authentication errors).
> 
> BTW, "pg_ctl status" doesn't answer this need because it only looks for
> a postmaster.pid file, it doesn't attempt to verify that the postmaster
> is really alive.

Is improving this a TODO item for pg_ctl?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-sql по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: How to check postgres running or not ?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Implicit Transactions