Re: libpq: Which functions may hang due to network issues?

Поиск
Список
Период
Сортировка
От Daniel Frey
Тема Re: libpq: Which functions may hang due to network issues?
Дата
Msg-id F58C28F1-E749-4ADB-B1D3-EACC3D5829AD@gmx.de
обсуждение исходный текст
Ответ на Re: libpq: Which functions may hang due to network issues?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: libpq: Which functions may hang due to network issues?  (Daniel Frey <d.frey@gmx.de>)
Список pgsql-general
> On 5. Dec 2021, at 17:01, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Daniel Frey <d.frey@gmx.de> writes:
>> With all that said, I think that PostgreSQL/libpq should have a clear, documented way to get rid of a connection
thatis guaranteed to not hang. It has something similar for almost all other methods like opening connections, sending
request,retrieving results. Why stop there? 
>
> AFAICS, PQfinish() already acts that way, at least up to the same level of
> guarantee as you have for "all other methods".  That is, if you previously
> set the connection into nonblock mode, it won't block.

OK, thanks Tom, that is at least something. I would still like this to be kinda documented/guaranteed, especially if
nonblockingmode is required for this behavior (which is given in my case). But I guess that's not up to me, so I'll
dropthe topic and I'll just have to accept the status quo. 

Thanks, Daniel




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: libpq: Which functions may hang due to network issues?
Следующее
От: James Sewell
Дата:
Сообщение: Re: Max connections reached without max connections reached