Re: connection watchdog

Поиск
Список
Период
Сортировка
От Michael Kichanov
Тема Re: connection watchdog
Дата
Msg-id 200210101528.TAA29458@mix.nordlink.ru
обсуждение исходный текст
Ответ на Re: connection watchdog  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
Ответы Re: connection watchdog  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
Список 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.
>
> There is a function which returns fd of the connection to postgresql database.
> If you install a SIGPIPE handler on that connections, perhaps you can catch the
> signal that backend is killed. But you will get that signal only when you
> attempt to write to the  fd, according to 'man 7 signal' on my mandrake box.
>
> Just theory. Try it out and let us know if it works..

The point is that I don't want to use an interface level lower
than libpq interface level. At present I using a common "select 1" query
(via PQexec()) with check it reslut for this purpose. But this method
results in growing pgsql log and needless load of PG engine.

> Bye
>  Shridhar

mike

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

Предыдущее
От: "Roberto (SmartBit)"
Дата:
Сообщение: Fw: Getting tables, procedures, etc.
Следующее
От: "Shridhar Daithankar"
Дата:
Сообщение: Re: Getting tables, procedures, etc.