Re: Fixing memory leaks in postgres_fdw

From: Matheus Alcantara <matheusssilv97(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Fixing memory leaks in postgres_fdw
Date: 2025-05-29 20:49:57
Message-ID: CAFY6G8f19mBoMVc1U0GVjw-MOKpwOny2sH1H2r4jECZdd7gxcQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 29, 2025 at 2:02 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> I wrote:
> > Pushed v5-0001, and here are rebased versions of the other four
> > patches, mostly so that the cfbot knows what is the patch-of-record.
>
> Finally, here's a minimalistic version of the original v1-0001
> patch that I think we could safely apply to fix the DirectModify
> problem in the back branches. I rejiggered it to not depend on
> inventing MemoryContextUnregisterResetCallback, so that there's
> not hazards of minor-version skew between postgres_fdw and the
> main backend. This will of course not fix any other PGresult-leakage
> cases that may exist, but I'm content to fix the known problem
> in back branches.
>
> (Patch is labeled .txt so that cfbot doesn't think it's the
> patch-of-record.)
>

Sounds reasonable to me. +1 for going forward with these patches.

--
Matheus Alcantara

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-05-29 21:31:50 Re: Improve explicit cursor handling in pg_stat_statements
Previous Message Masahiko Sawada 2025-05-29 19:24:55 Re: Fix slot synchronization with two_phase decoding enabled