Re: weird interaction between asynchronous queries and pg_sleep

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: weird interaction between asynchronous queries and pg_sleep
Дата
Msg-id CAHyXU0xR0=Vp+4SdKpsTLYowr_54=nHnoYNnm68E5z+m6vdgxQ@mail.gmail.com
обсуждение исходный текст
Ответ на weird interaction between asynchronous queries and pg_sleep  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
On Thu, Apr 8, 2021 at 1:05 PM Merlin Moncure <mmoncure@gmail.com> wrote:
> This effect is only noticeable when the remote query is returning
> volumes of data.  My question is, is there any way to sleep loop
> client side without giving up 3x performance penalty?  Why is that
> that when more local sleep queries are executed, performance improves?


Looking at this more, it looks like that when sleeping with pg_sleep,
libpq does not receive the data.  I think for this type of pattern to
work correctly, dblink would need a custom sleep function wrapping
poll (or epoll) that consumes input on the socket when signalled read
ready.

merlin



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: SQL-standard function body
Следующее
От: Tatsuro Yamada
Дата:
Сообщение: Re: Typo in jsonfuncs.c