Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-7459

Fetch size does not work on Postgres JDBC plugin

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.15.0
    • 1.18.0
    • Storage - JDBC
    • None

    Description

      To prevent the drill from going out of memory, it is suggested to set the fetch size in Jdbc URL to enable data streaming(#DRILL-6794 discusses this). This does not work on Postgres for the following reason:

      For fetchSize size to work on Postgres, the connection must not be in autocommit mode. There is no parameter to set autocommit to false in connection string other than programmatically calling conn.setAutoCommit(false).

      See https://jdbc.postgresql.org/documentation/93/query.html#fetchsize-example
      See https://jdbc.postgresql.org/documentation/head/connect.html for the list of all connection string properties.

      Fix is to add a property 'defaultAutoCommit' to JdbcStorageConfig and call BasicDataSource#setDefaultAutoCommit in JdbcStoragePlugin.

      Attachments

        Issue Links

          Activity

            People

              arina Arina Ielchiieva
              priyankabhoir777@gmail.com Priyanka Bhoir
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: