jkff commented on a change in pull request #14338:
URL: https://github.com/apache/beam/pull/14338#discussion_r601675706



##########
File path: 
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
##########
@@ -903,6 +903,8 @@ public void processElement(ProcessContext context) throws 
Exception {
       if (connection == null) {
         connection = dataSource.getConnection();
       }
+      // PostgreSQL requires autocommit to be disabled to enable cursor 
streaming

Review comment:
       In the source code. If someone wonders why this is here and why Postgres 
requires this (and whether other DBs might also require it for the same 
reason), it's better if they can see it right there in the code rather than 
have to dig into Git history.
   
   I would perhaps propose the following phrasing:
   
   ```
   Some databases require autocommit to be disabled to enable cursor streaming.
   E.g. PostgreSQL: 
https://jdbc.postgresql.org/documentation/head/query.html#query-with-cursor
   ```




-- 
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.

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


Reply via email to