Hi Manu, On Tue, Oct 6, 2026, you wrote: > I can share it if that is useful for judging whether the field earns its keep.
I'd like to take you up on that. I'm a PhD student in Computer Science working on how to divide a fixed per-query working-memory budget among the Sort, Hash Join and Hash Aggregate nodes of a plan. The approach combines per-operator spill-cost models, the overlap of node memory lifetimes, and a probabilistic bound on exceeding the budget. Your per-node workmem field is exactly the enforcement hook this needs, and pg_mem_governor would be an important baseline. Could you share the pg_mem_governor source (a repository link or a tarball is fine), together with the spill-calibration scripts or data it uses, if those are separate? I would: - run it on your v2 patch against PostgreSQL 19 and compare it with other allocation policies at equal budgets on TPC-H and JOB; - credit and cite it in anything I publish; and - post any results that bear on the Plan.workmem field back to this thread. If there is a licence you'd like it used under, or you'd prefer I not redistribute it, just say so. In return I'm happy to test the patch more widely. I'm currently measuring when Sort, Hash and HashAggregate nodes actually release their memory during execution, and I'll share the results here. Thanks, Saheed Ajiboye PhD candidate, Department of Computer Science Nile University of Nigeria
