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
I'm using node pg + the copy extension to run COPY TO STDOUT on the postgres server to write to a file locally. I've noticed that certain tables and row combinations result in the readable stream never recieving the "end" event (even when data events stop coming through). Thus the stream hangs open forever. I then checked the pg_stat_progress_copy table and that had 0 results even when the stream was still hanging. I then checked the pg_stat_activity and can see the copy process in there in an idle state. The data size in my repo case is 300 lines from the DB aka very small. I actually noticed this issue with the postgresjs package too. So I'm not sure if its specific to nodepg or postgres.
Here I attached end and close event listeners to the readable stream. You can see the first "downloading" gets a end and close event. While the second readable stream does not and hangs.
Edit: I'm noticing it actually getting stuck on the same table which never sends the close event but doesnt read any more data in
Thank you.
The text was updated successfully, but these errors were encountered:
Hey all,
I'm using node pg + the copy extension to run COPY TO STDOUT on the postgres server to write to a file locally. I've noticed that certain tables and row combinations result in the readable stream never recieving the "end" event (even when data events stop coming through). Thus the stream hangs open forever. I then checked the
pg_stat_progress_copy
table and that had 0 results even when the stream was still hanging. I then checked thepg_stat_activity
and can see the copy process in there in an idle state. The data size in my repo case is 300 lines from the DB aka very small. I actually noticed this issue with the postgresjs package too. So I'm not sure if its specific to nodepg or postgres.Here is an example of my COPY code
Here I attached end and close event listeners to the readable stream. You can see the first "downloading" gets a end and close event. While the second readable stream does not and hangs.
Edit: I'm noticing it actually getting stuck on the same table which never sends the close event but doesnt read any more data in
Thank you.
The text was updated successfully, but these errors were encountered: