PL/Python memory leak

Started by Nigel J. Andrewsalmost 24 years ago4 messagespatches
Jump to latest
#1Nigel J. Andrews
nandrews@investsystems.co.uk

Adds SPI_freeplan() to the plan object destructor instead of the simple
pfree() added in version 1.25

--
Nigel J. Andrews

Attachments:

plpython.c.patchtext/plain; charset=US-ASCII; name=plpython.c.patchDownload+2-2
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Nigel J. Andrews (#1)
Re: PL/Python memory leak

"Nigel J. Andrews" <nandrews@investsystems.co.uk> writes:

Adds SPI_freeplan() to the plan object destructor instead of the simple
pfree() added in version 1.25

Shouldn't you also fix the now-incorrect comments above that?

regards, tom lane

#3Nigel J. Andrews
nandrews@investsystems.co.uk
In reply to: Nigel J. Andrews (#1)
PL/Python memory leak (Replaces earlier patch from today)

Adds SPI_freeplan() to the plan object destructor instead of the simple
pfree() added in version 1.25
Removes comment in plan object destructor discussing this point
Adds SPI_freeplan in PLy_spi_prepare() to reclaim plan memory allocated
in the procedure's context by SPI_prepare()

Attachments:

plpython.c.patchtext/plain; charset=US-ASCII; name=plpython.c.patchDownload+21-21
#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Nigel J. Andrews (#3)
Re: PL/Python memory leak (Replaces earlier patch from today)

"Nigel J. Andrews" <nandrews@investsystems.co.uk> writes:

Adds SPI_freeplan() to the plan object destructor instead of the simple
pfree() added in version 1.25
Removes comment in plan object destructor discussing this point
Adds SPI_freeplan in PLy_spi_prepare() to reclaim plan memory allocated
in the procedure's context by SPI_prepare()

Applied, along with similar fixes for parallel leakages in plpgsql and
pltcl.

regards, tom lane