Re: Memory leak with PL/Python trigger

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, "Behn, Edward (EBEHN)" <EBEHN(at)arinc(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Memory leak with PL/Python trigger
Date: 2015-08-10 01:41:39
Message-ID: CAJrrPGcBLU88heef0TB_imuj5VBsz5nDSC-QwmO4-TtAx0_TsA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-bugs

On Mon, Aug 3, 2015 at 3:12 PM, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com> wrote:
>
> Here I attached an updated patch by changing the context into
> PLyExecutionContext and CurrrentMemoryContext
> except in PLy_procedure_create function. In PLy_procedure_create
> function the TopMemoryContext only used.
>
> Along with the above changes, I added a list_free_deep in
> PLy_procedure_delete function to clean the
> proc->trftypes.
>

Here I attached updated patch with a context allocation in
"PLy_procedure_create" function and the same context is reset
in every function call of "PLy_procedure_get" for all PLY types.

I ran all PL/Python tests and it is fine.

Any comments?

Regards,
Hari Babu
Fujitsu Australia

Attachment Content-Type Size
fix-plpython-typeinfo-leaks-3.patch application/octet-stream 15.8 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message haiyi_yang 2015-08-10 08:04:39 BUG #13557: ESQL select issue
Previous Message Bruce Momjian 2015-08-10 00:08:49 Re: BUG #13445: 8.15.1 is missleading regarding array dimensionality