Re: libpq: indefinite block on poll during network problems

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: libpq: indefinite block on poll during network problems
Дата
Msg-id CAHyXU0xYiTniq=i4cBHg8JSKWQ0VOJOFCkxn-uu-0KVdswtryg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: libpq: indefinite block on poll during network problems  (Dmitry Samonenko <shreddingwork@gmail.com>)
Список pgsql-general
On Fri, May 30, 2014 at 4:00 PM, Dmitry Samonenko
<shreddingwork@gmail.com> wrote:
>  I'm troubled with possible 'imperfection' of very simple, yet core feature
> - PQexec, which can lead to blocked applications. You believe that the
> problem is caused by client design flaw. Okay, fine. Is it possible to mark
> this potential problem with warning in official documentation?

That's not warranted here IMNSHO.   There is an asynchronous API for
dealing with these types of situations.  Given that the blocking
execution functions do not take a timeout parameter and depend on
unreliable facilities, unbounded execution time should be expected.

Writing robust libpq applications generally involves using the
asynchronous API.  It's better in just about every way except
easiness.

merlin


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

Предыдущее
От: sramay
Дата:
Сообщение: bytea Issue - Reg
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: bytea Issue - Reg