You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Leona Yoda (Jira)" <ji...@apache.org> on 2022/02/07 03:01:00 UTC

[jira] [Commented] (SPARK-38116) Ability to turn off auto commit in JDBC source for read only operations

    [ https://issues.apache.org/jira/browse/SPARK-38116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17487841#comment-17487841 ] 

Leona Yoda commented on SPARK-38116:
------------------------------------

I would like to work on this.

> Ability to turn off auto commit in JDBC source for read only operations
> -----------------------------------------------------------------------
>
>                 Key: SPARK-38116
>                 URL: https://issues.apache.org/jira/browse/SPARK-38116
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.2.1
>            Reporter: Artem Kupchinskiy
>            Priority: Minor
>
> Currently, all the jdbc connections on executors side work always with auto commit option set to true.
> However, there are cases where this mode makes hard to use JdbcRelationProvider at all, i.e. reading huge datasets from Postgres (a whole result set is collected regardless of a fetch size when autocommit is set to true https://jdbc.postgresql.org/documentation/91/query.html#query-with-cursor )
> So the proposal is following:
>  # Add a boolean option "autocommit" to JDBC Source allowing a user to turn off autocommit mode for read only operations.
>  # Add guards which prevent using this option in DML operations.  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org