pltcl and plpython memory leak revisited

From: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
To: pgsql-patches(at)postgresql(dot)org
Subject: pltcl and plpython memory leak revisited
Date: 2002-10-04 10:50:46
Message-ID: Pine.LNX.4.21.0210041123400.22900-300000@ponder.fairway2k.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

I have attached two patches as per:

1) pltcl:
Add SPI_freetuptable() calls to avoid memory leaks (Me + Neil Conway)
Change sprintf()s to snprintf()s (Neil Conway)
Remove header files included elsewhere (Neil Conway)

2)plpython:
Add SPI_freetuptable() calls to avoid memory leaks
Cosemtic change to remove a compiler warning

Notes:

I have tested pltcl.c for
a) the original leak problem reported for the repeated call of spi_exec in a
TCL fragment
and b) the subsequent report resulting from the use of spi_exec -array in a TCL
fragment.

The plpython.c patch is exactly the same as that applied to make revision 1.23,
the plpython_schema.sql and feature.expected sections of the patch are also the
same as last submited, applied and subsequently reversed out. It remains
untested by me (other than via make check). However, this should be safe
provided PyString_FromString() _copies_ the given string to make a PyObject.

--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants

Attachment Content-Type Size
pltcl.freett.patch text/plain 14.4 KB
plpython.freett.patch text/plain 2.8 KB

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-10-04 15:11:56 Re: another attempt at fixing contrib/rserv...
Previous Message Alexey Borzov 2002-10-04 08:15:57 Another attempt at fixing contrib/rserv