I'm wondering how ozo exchanges data between PostgreSQL. I know sockets are used between the two and if transferred data is big enough, it's divided and sent by chunks, e.g. of 16KB each, so that when we are fetching 2MB of data, 2000/16 = 128 packets will be sent.
Assuming I want to push fetched rows to a vector, my question is: will ozo wait for all packets and only then start to push back to vector, or it'll push back to vector on the fly, releasing memory of 'used' (pushed back) packets? The reason between these 2 approaches is that (in some small time window) in the first case we'll need to reserve about 2*2MB of memory on the application side (2MB for the vector and 2MB for all data transferred from postgres), while the former case requires only roughly 2MB (2MB for the vector, and some memory for not-yet-pushed-to-vector packets).
I'm guessing ozo needs to have all the data from postgres transferred before it starts to push it back to a vector, am I right?
I'm wondering how ozo exchanges data between PostgreSQL. I know sockets are used between the two and if transferred data is big enough, it's divided and sent by chunks, e.g. of 16KB each, so that when we are fetching 2MB of data, 2000/16 = 128 packets will be sent.
Assuming I want to push fetched rows to a
vector, my question is: will ozo wait for all packets and only then start to push back tovector, or it'll push back tovectoron the fly, releasing memory of 'used' (pushed back) packets? The reason between these 2 approaches is that (in some small time window) in the first case we'll need to reserve about 2*2MB of memory on the application side (2MB for thevectorand 2MB for all data transferred from postgres), while the former case requires only roughly 2MB (2MB for thevector, and some memory for not-yet-pushed-to-vector packets).I'm guessing ozo needs to have all the data from postgres transferred before it starts to push it back to a
vector, am I right?