Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-11881

[SQL] JDBC Postgres fetchsize parameter ignored

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.0
    • 1.6.0
    • SQL
    • None

    Description

      Reference: https://jdbc.postgresql.org/documentation/head/query.html#query-with-cursor

      In order for PostgreSQL to honor the fetchSize non-zero setting, its Connection.autoCommit needs to be set to false. Otherwise, it will just quietly ignore the fetchSize setting.

      Since the JDBC driver doesn’t serialize the result data in its memory, we don’t want to have 2-3 times of the memory created in the driver first before Spark can fetch anything into its serialized data storage.

      Attachments

        Activity

          People

            mariusvniekerk Marius van Niekerk
            mariusvniekerk Marius van Niekerk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: