The psycopg does not use server-side cursor, and tries to just load all the
results of a query to the hosts memory.
This lessens the burden, although it still is quite memory-consuming because
we want to have the session which can rollback, and this basically stores all
the changed results locally, before applying the changes to DB.
This ended up using about 10 gigs of memory on dev (about 50k duplicate jobs,
about 3.5M results to be moved), which is still bad, but manageable enough
so I don't want to spend more time on it.
Details
Details
Tested in production! (dev actually...)
Diff Detail
Diff Detail
- Repository
- rRSDB resultsdb
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.