Re: connection watchdog

Поиск
Список
Период
Сортировка
От Michael Kichanov
Тема Re: connection watchdog
Дата
Msg-id 200210101543.TAA02419@mix.nordlink.ru
обсуждение исходный текст
Ответ на Re: connection watchdog  (frbn <frbn@efbs-seafrigo.fr>)
Список pgsql-general
> > How can I check from C-program whether connection to pgsql
> > engine still works or already lost?
> > PQstatus() returns CONNECTION_OK even when backend process is killed
> > by hands after connection is made.
>
> > ps: Searching through pgsql-mail-lists archive and Faq gave nothing.
>
> I think you can't know if a connection is ok before trying to send
> a query to the server (IMHO)
>
> If you really want to know before, you can send a simple query  (select '1')
> and test the PGResult
> (!= PGRES_COMMAND_OK or !=PGRES_TUPLES_OK or ==PGRES_BAD_RESPONSE or ==PGRES_FATAL_ERROR)

thanx, but now I doing just this thing :)
and I would need something like PQping() ;)

mike

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

Предыдущее
От: Hector Galicia
Дата:
Сообщение: parameters in views
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: access time performance problem