Skip to content
This repository has been archived by the owner on Mar 30, 2020. It is now read-only.

Commit

Permalink
sql: stream results over pgwire
Browse files Browse the repository at this point in the history
Prior to this change the entire result set of a SQL query (or multiple,
depending on how many were sent in a single string) were buffered into
memory before they were sent to the client.

This is fine for small result sets but for queries with larger result
sets the memory consumption was less than ideal -- in extreme cases
the query would exceed its memory budget making the query not able
to be run at all.

This change adds support for streaming results over pgwire to a client.
Given a SQL string the server will buffer the result set in 16KB
chunks -- unless we encounter an error, which will then be immediately
sent to the client.

Closes: #7775.
  • Loading branch information
tso committed Aug 10, 2017
1 parent 031691d commit ad69423
Showing 1 changed file with 360 additions and 158 deletions.
Loading

0 comments on commit ad69423

Please sign in to comment.