Re: BUG #19040: Memory leak in hashed subplan node due to missing hashtempcxt reset

feichanghong <feichanghong@qq.com>

From: feichanghong <feichanghong@qq.com>
To: "李海洋(陌痕)" <mohen.lhy@alibaba-inc.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, ocean_li_996 <ocean_li_996@163.com>, "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2025-09-10T02:32:00Z
Lists: pgsql-bugs

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Eliminate duplicative hashtempcxt in nodeSubplan.c.

  2. Fix memory leakage in nodeSubplan.c.

  3. Do execGrouping.c via expression eval machinery, take two.

  4. Fix potential failure when hashing the output of a subplan that produces


> On Sep 10, 2025, at 09:55, 李海洋(陌痕) <mohen.lhy@alibaba-inc.com> wrote:
> 
> On 2025-09-09 22:24:22 Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> > Digging in the archives, I found the discussion leading to 133924e1 at
> > https://www.postgresql.org/message-id/flat/i2jnbo%241lcj%241%40news.hub.org
> 
> 
> Having understood the background of this issue, and given that v04-0002 only applies to master, 
> v04-0002 LGTM, again.
> 
> Thanks for your analysis. 

Thanks for the analysis! v04-0002 looks fine to me — please just apply it on
HEAD.

Best Regards,
Fei Changhong