title: execute_values with SELECT statement
body: <p>I am using table merging in order to select items from my db against a list of parameter tuples. The query works fine, but <code>cur.fetchall()</code> does not return the entire table that I want.</p>
  <p>For example:</p>
  <pre><code>data = (
      (1, '2020-11-19'),
      (1, '2020-11-20'),
      (1, '2020-11-21'),
      (2, '2020-11-19'),
      (2, '2020-11-20'),
      (2, '2020-11-21')
  )
          
  query = &quot;&quot;&quot;
      with data(song_id, date) as (
          values %s
      )
      select t.*
      from my_table t
      join data d 
      on t.song_id = d.song_id and t.date = d.date::date
  &quot;&quot;&quot;
  execute_values(cursor, query, data)
  results = cursor.fetchall()
  </code></pre>
  <p>In practice, my list of tuples to check against is thousands of rows long, and I expect the response to also be thousands of rows long.</p>
  <p>But I am only getting 5 rows back if I call <code>cur.fetchall()</code> at the end of this request.</p>
  <p>I know that this is because <code>execute_values</code> batches the requests, but there is some strange behavior.</p>
  <p>If I pass <code>page_size=10</code> then I get 2 items back. And if I set <code>fetch=True</code> then I get no results at all (even though the <code>rowcount</code> does not match that).</p>
  <p>My thought was to batch these requests, but the <code>page_size</code> for the batch is not matching the number of items that I'm expecting per batch.</p>
  <p>How should I change this request so that I can get all the results I'm expecting?</p>