You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Streams work fine when copying, but if the stream is sent to the compression pipe, the entire pool of connections freezes.
Example, playback:
importpostgresfrom'postgres';import{createGzip}from'zlib';constdb=postgres({max: 2,});for(leti=0;i<10;i++){letstream=awaitdb.unsafe(`COPY pg_catalog.pg_attribute TO STDOUT`).readable();stream.pipe(createGzip()).on('data',console.log);awaitdb.unsafe(`SELECT $1 AS "CONTINUE"`,[i]);}console.log(awaitdb.unsafe(`SELECT 'DONE' AS "END"`));
I play with pipe, but in any case, something is wrong with the connection pool after sending the stream to the pipe.
The text was updated successfully, but these errors were encountered:
uasan
changed the title
Copy stream often hangs if using gzip stream compression
Copy stream hangs if using gzip stream compression
Oct 7, 2022
It seems that this problem was the cause of the connection errors that I described here #457. Due to the pipe, connections in the pool become busy in read mode, although postgres has returned the response and there is nothing to read
I wonder if I am hitting a similar issue. Certain copy commands are read to stdout into a readable stream. Those readable streams sometimes just hang and it seems as if the "end" event is never transmitted.
Hello, we caught a cool bug )
Streams work fine when copying, but if the stream is sent to the compression pipe, the entire pool of connections freezes.
Example, playback:
I play with pipe, but in any case, something is wrong with the connection pool after sending the stream to the pipe.
The text was updated successfully, but these errors were encountered: