On 09/06/2026 12:43, Tomas Vondra wrote:
> I'm not sure what to do about this. I suppose it'd be good to have a
> better idea if the path got used, in some way.
Looking ahead, I believe Tom's idea of using a selectivity-estimation memory
context can help lower memory spikes when working with massive clauses.
A combination of Ashutosh's 'smart references' [2] and a per-RelOptInfo memory
context might reduce memory usage even further. Right now, partitionwise-enabled
planning with parameterised join paths can lead to high peak memory usage due to
reparameterisation copy.
[1] https://www.postgresql.org/message-id/1367418.1708816059@sss.pgh.pa.us
[2]
https://www.postgresql.org/message-id/CAExHW5tUcVsBkq9qT=L5vYz4e-cwQNw=KAGJrtSyzOp3F=XacA@mail.gmail.com
--
regards, Andrei Lepikhov,
pgEdge