title: dbGetQuery and dbReadTable failing to return a really large table DBI
body: <p>I have a really large table (8M rows) that I need to import in R on which I will be doing some processing. Problem is when I try to bring it in R using the DBI package I get an error</p>
  
  <p>My code is below</p>
  
  <pre><code>options(java.parameters = "-Xmx8048m") 
  psql.jdbc.driver &lt;- "../postgresql-42.2.1.jar"
  jdbc.url &lt;- "jdbc:postgresql://server_url:port"
  pgsql &lt;- JDBC("org.postgresql.Driver", psql.jdbc.driver, "`")
  con &lt;- dbConnect(pgsql, jdbc.url, user="", password= '')
  tbl &lt;- dbGetQuery(con, "SELECT * FROM my_table;")
  </code></pre>
  
  <p>And the error I get is </p>
  
  <pre><code>Error in .verify.JDBC.result(r, "Unable to retrieve JDBC result set for ",  : 
  Unable to retrieve JDBC result set for SELECT * FROM my_table; (Ran out of memory retrieving query results.) 
  </code></pre>
  
  <p>I can understand its because the result set is too big but I am not sure how to retrieve it by batches instead of all of it together. I have tried using dBSendQuery, dbReadTable and dbGetQuery all of them give the same error.</p>
  
  <p>Any help would be appreciated!</p>