Skip to content
  • sam marshall's avatar
    MDL-60174 core_dml: get_recordset on Postgres eats all the RAM · ed00d67c
    sam marshall authored
    On Postgres, get_recordset_sql loads all the results into memory
    (within the Postgres library, which doesn't count towards the PHP
    memory limit, but does count towards making your server run out of
    memory) as soon as the query completes.
    
    This commit changes the code to use cursors, which in Postgres
    allow the results to be returned in smaller chunks (by default
    100,000 rows).
    ed00d67c