sunng87 / pgwire

PostgreSQL wire protocol implemented as a rust library.
Apache License 2.0
531 stars 40 forks source link

Stream data row response #17

Closed sunng87 closed 2 years ago

sunng87 commented 2 years ago

Our current implementation collects all DataRows from a query into an in-memory vector. This can cause memory issue when query returns large mount of rows, and does not work with streaming scenarios like live query.

The initial proposal is to make QueryResponse to hold Arc<Stream<Item=DataRow>>.

sunng87 commented 2 years ago

Implemented in #20 and #21