Re: weird interaction between asynchronous queries and pg_sleep

2021-04-08 Thread Merlin Moncure
On Thu, Apr 8, 2021 at 1:05 PM Merlin Moncure 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

weird interaction between asynchronous queries and pg_sleep

2021-04-08 Thread Merlin Moncure
Consider the following snippet create table data as select generate_series(1,100) s; do $d$ begin PERFORM * FROM dblink_connect('test',''); PERFORM * from dblink_send_query('test', 'SELECT * FROM data'); LOOP if dblink_is_busy('test') = 0 THEN PERFORM * FROM dblink_get_r