Re: Getting results after networking error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Getting results after networking error
Дата
Msg-id 21820.1123643273@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Getting results after networking error  (jtv@xs4all.nl)
Ответы Re: Getting results after networking error
Список pgsql-interfaces
jtv@xs4all.nl writes:
> Tom Lane wrote:
>> On the whole I think the odds of re-syncing successfully are pretty bad,
>> and you'd be best off to pull the plug and start a new connection if you
>> see any networking failure.

> I guess that makes sense.  But how do I know that the failure is a
> networking failure and not, say, an SQL-level failure?  In my program, I
> mean, without human intervention?

I think that a reasonable API for this "if PQstatus(conn) is
CONNECTION_BAD then you had a networking problem".  I am not at all sure
how well libpq honors that definition currently ... but feel free to
send patches ;-)
        regards, tom lane


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

Предыдущее
От: jtv@xs4all.nl
Дата:
Сообщение: Re: Getting results after networking error
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: pgperl vs dbd-perl