Re: [INTERFACES] timeouts in libpq- can libpq requests block forever/a very long time?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [INTERFACES] timeouts in libpq- can libpq requests block forever/a very long time?
Дата
Msg-id 8248.938889802@sss.pgh.pa.us
обсуждение исходный текст
Ответ на timeouts in libpq- can libpq requests block forever/a very long time?  (Dirk Niggemann <dirk-n@dircon.co.uk>)
Список pgsql-interfaces
Dirk Niggemann <dirk-n@dircon.co.uk> writes:
> Would there be any problems with changing pqWait so it uses a timeout?

I think this would be rather risky: if I issue a query that the backend
takes a long time to compute, I don't want libpq timing out on me,
*especially* not if its response is to close the connection rather than
some fail-soft recovery technique.  If the timeout is
application-settable and defaults to infinity, it might be OK.

In my own applications using the asynchronous query features, I have not
seen any actual hangups that could be improved by a timeout ... but I've
mostly been working across LAN rather than WAN connections...

> I would also like to add a timeout for the connect operation on the
> socket-
> on a sufficiently frazzled WAN this could block for a long time-

This might be useful, but again I wonder whether libpq ought to be
second-guessing the transport system about how long is reasonable to
wait for a response.
        regards, tom lane


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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: [INTERFACES] PL_na undeclared
Следующее
От: John Cusick
Дата:
Сообщение: Re: [INTERFACES] PL_na undeclared