David Rowley <dgrowleyml@gmail.com> writes:
> On Fri, 28 Feb 2025 at 07:42, Jeff Davis <pgsql@j-davis.com> wrote:
>> My first reaction is that it's not right because the costing for the
>> plan is completely bogus with a different work_mem. It would make more
>> sense to me if we either (a) enforced work_mem as it was at the time of
>> planning; or (b) replanned if executed with a different work_mem
>> (similar to how we replan sometimes with different parameters).
> If we were to fix this then a) effectively already happens for the
> enable_* GUCs, so b) would be the only logical way to fix.
Given that nobody's complained about this for twenty-plus years,
I can't get excited about adding complexity to do either thing.
regards, tom lane