Re: Getting results after networking error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Getting results after networking error
Дата
Msg-id 16904.1123604812@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Getting results after networking error  (jtv@xs4all.nl)
Ответы Re: Getting results after networking error
Список pgsql-interfaces
jtv@xs4all.nl writes:
> I sometimes issue multiple queries at once using semicolons, so one call
> returns multiple results.  Now let's say my network connection to the
> backend breaks and not all the results can be returned--I get a result
> with some error code (wish I knew which, but that's another story)
> followed by a NULL result to indicate that no more results are following,
> right?

> Now let's say that I issue my next query and the network connection
> recovers in the process.  I happily start retrieving results again, but
> are they only results for the new query, or do I go through the remaining
> results of the last query first?

I don't think there is a unique answer to that, without a whole lot of
assumptions about the nature of the failure and the behavior of the
network transport layer.  Did the backend see any send() failures?
Did the transport layer permanently lose any data already given to it,
or just delay transmission?

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.
        regards, tom lane


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

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