Re: Should work_mem be stable for a prepared statement? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Should work_mem be stable for a prepared statement?
Date
Msg-id 2633722.1740693846@sss.pgh.pa.us
Whole thread Raw
In response to Re: Should work_mem be stable for a prepared statement?  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Should work_mem be stable for a prepared statement?
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: "Devulapalli, Raghuveer"
Date:
Subject: RE: Improve CRC32C performance on SSE4.2
Next
From: Melanie Plageman
Date:
Subject: Re: Log connection establishment timings