Skip to content

Does ozo need to fetch all data from postgres before it starts to e.g. push it back to a vector? #295

Description

@psmaron

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions