Re: PQstatus() detect change in connection...

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: PQstatus() detect change in connection...
Дата
Msg-id Pine.LNX.4.30.0110182005470.633-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: PQstatus() detect change in connection...  (Matthew Hagerty <mhagerty@voyager.net>)
Список pgsql-hackers
Matthew Hagerty writes:

> I am trying to re-establish a connection, however, I cannot afford to issue
> a query to determine if the connection still exists.

But requesting that the server do something *is* the only way to know
whether it's still alive.  Another question to ask, of course, would be,
why is your server always going down?

> I've been digging into the libpq code to see what is going on, maybe I can
> gleam a little hint or two  there...  Anyone know a good *fast* way to test
> if a socket is still valid?

Try to send or receive something.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: compiling libpq++ on Solaris with Sun SPRO6U2 (fixed
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: autoconf taking forever?