Re: Memory usage during sorting
Peter Geoghegan <peter@2ndquadrant.com>
From: Peter Geoghegan <peter@2ndquadrant.com>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2012-01-22T00:51:58Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Improve performance of our private version of qsort. Per recent testing,
- a3f0b3d68f9a 8.2.0 cited
-
Further performance improvements in sorting: reduce number of comparisons
- cf627ab41ab9 7.1.1 cited
On 16 January 2012 00:59, Jeff Janes <jeff.janes@gmail.com> wrote: > I think it would be better to pre-deduct the tape overhead amount we > will need if we decide to switch to tape sort from the availMem before > we even start reading (and then add it back if we do indeed make that > switch). That way we wouldn't over-run the memory in the first place. > However, that would cause apparent regressions in which sorts that > previously fit into maintenance_work_mem no longer do. Boosting > maintenance_work_mem to a level that was actually being used > previously would fix those regressions, but pointing out that the > previous behavior was not optimal doesn't change the fact that people > are used to it and perhaps tuned to it. So the attached patch seems > more backwards-friendly. Hmm. Are people really setting maintenance_work_mem such that it is exactly large enough to quicksort when building an index in one case but not another? Is the difference large enough to warrant avoiding pre-deduction? -- Peter Geoghegan http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training and Services