terrymanu commented on issue #37183:
URL: 
https://github.com/apache/shardingsphere/issues/37183#issuecomment-3592473622

   Thank you for raising this potential issue.
   To accurately determine whether the behavior in ShardingSphere-Proxy is 
correct, we need to further confirm the actual PostgreSQL behavior when 
Execute(maxRows = 0) is used.
   
   According to the PostgreSQL Extended Query Protocol, the maxRows field is 
controlled by the client, but the official documentation does not explicitly 
define the meaning of maxRows = 0. Therefore, we would like to ask for your 
help to confirm the following:
   
   Could you help confirm whether the following behaviors match the actual 
PostgreSQL server behavior?
   
   When the client sends Execute(portal, maxRows = 0),
   does PostgreSQL always return all result rows (i.e., unlimited fetch)?
   
   Under this condition, does PostgreSQL:
   
   stream rows to the client as they are read, or
   
   buffer the entire result set in memory before sending?
   
   ShardingSphere aims to keep its behavior consistent with PostgreSQL's native 
protocol.
   If PostgreSQL returns the full result set for maxRows = 0, then Proxy should 
follow the same semantics.
   If PostgreSQL handles this more efficiently, we are also open to adapting 
the same behavior.
   
   We would also appreciate your thoughts on the following:
   
   Would you recommend Proxy to introduce protective mechanisms for large 
result sets (e.g., streaming, batch sending, or a configurable maximum row 
limit)?
   
   Do you have any concrete test cases or tools we can use to compare 
PostgreSQL and Proxy memory behavior in this scenario?
   
   Thank you again for reporting this issue.
   Confirming the actual PostgreSQL protocol behavior will help us determine 
whether improvements or fixes are needed on the ShardingSphere-Proxy side.
   We appreciate any additional observations or suggestions you may have!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to