Comments (5)
can I ask what you mean by "table with no keys" ? do you mean "empty table" vs "non empty table" ?
from node-pg-copy-streams.
You know what. It was obviously problem with my implementation. I was opening multiple streams but only from one client and I suspect one had to wait for another to finish and this is why data couldn't "flow" through the system
from node-pg-copy-streams.
ok thanks for closing this. you may still want to dig into why so much data gets buffered. I suspect you have a problem (or maybe this is a choice) with your sources not respecting the backpressure protocol (a source should stop writing into a sink when sink.write returns false)
from node-pg-copy-streams.
I know what was causing this. I only had one stream (green) opened at the same time and it was causing yellow and red to be stuck in between:
Other streams had to wait until the green stream can end (and green had to wait for readStream
to end) and only then other streams opened - that is why there was such a big delay between readStream.on('end')
and writeStream.on('finish')
.
My previous implementation used same PoolClient
to instantiate all 3 streams and this is why this happened. New implementation uses 3 different instances of PoolClient
to instantiate 3 streams, so now data can flow freely without waiting for other streams to finish:
And the time difference between tables was caused by the order of instantiating streams. I was getting really low times when writing only to green and really high times when writing to others
from node-pg-copy-streams.
ok. good job figuring that out !
from node-pg-copy-streams.
Related Issues (20)
- COPY errors result in hangs or delayed exceptions HOT 3
- copy-from performance with lots of chunks HOT 15
- Question: is it possible to get the line number of the file where copy failed? HOT 5
- copyFrom stream's end function does not behave as expected HOT 6
- Cannot execute multiple COPY commands within the same transaction HOT 2
- Error: Release called on client which has already been released to the pool. HOT 2
- copy-from fails when large csv file(200K+ user rows) is copied from the file to the DB HOT 17
- `COPY FROM` fails when upgrading from v6.0.1 to v6.0.2+ HOT 43
- Documentation doesn't work with latest `pg` HOT 6
- Idle connections with "COMMIT" HOT 2
- Something seems wrong with binary transfer for COPY ... FROM STDIN BINARY HOT 8
- Not really an issue... HOT 1
- client.query is not returning a stream HOT 10
- Row count always off by one on CopyToStreamQuery HOT 8
- Copying data failing but no error triggered HOT 23
- help needed: concurrent requests HOT 6
- copyFrom: TypeError: this.cb_ReadyForQuery is not a function HOT 5
- COPY TO with query_timeout
- Parametrizing COPY ... TO STDOUT query HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-pg-copy-streams.