On 3/19/23 20:31, Justin Pryzby wrote: > On Fri, Mar 17, 2023 at 05:41:11PM +0100, Tomas Vondra wrote: >>>> * Patch 2 is worth considering to backpatch >> >> I'm not quite sure what exactly are the numbered patches, as some of the >> threads had a number of different patch ideas, and I'm not sure which >> one was/is the most promising one. > > patch 2 is referring to the list of patches that was compiled > https://www.postgresql.org/message-id/20230310195114.6d0c5406%40karst
Ah, I see - it's just the "rebalancing" patch which minimizes the total amount of memory used (i.e. grow work_mem a bit, so that we don't allocate too many files). Yeah, I think that's the best we can do without reworking how we spill data (slicing or whatever). regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company