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

Поиск
Список
Период
Сортировка
От Daniel Frey
Тема Re: libpq: Which functions may hang due to network issues?
Дата
Msg-id 5680D61C-3BC3-426D-877C-3712B10FABC5@gmx.de
обсуждение исходный текст
Ответ на Re: libpq: Which functions may hang due to network issues?  (Daniel Frey <d.frey@gmx.de>)
Список pgsql-general
On 5. Dec 2021, at 21:32, Daniel Frey <d.frey@gmx.de> wrote:
>
>> 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.

One more question about this: What is the purpose of *not* using nonblocking mode with PQfinish()? Is there any benefit
tothe user in waiting for something? Or could it make sense for PQfinish() to always use nonblocking mode internally? 




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

Предыдущее
От: James Sewell
Дата:
Сообщение: Re: Max connections reached without max connections reached
Следующее
От: Avi Weinberg
Дата:
Сообщение: Are Foreign Key Disabled During Logical Replication Initial Sync?