Memory Leaks in plpgsql in 7.0.2

From: "Chris Knight" <chris(at)aims(dot)com(dot)au>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Memory Leaks in plpgsql in 7.0.2
Date: 2000-08-21 05:03:07
Message-ID: 000d01c00b2d$18ff43f0$020aa8c0@aims.private
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Howdy,

I've sent the following to Jan Weick, but haven't heard a reply. Thought I'd
send it to the list to see if others are having the same problem, and to see
if any Postgres developer reading this list will take ownership for this
problem:

I've found I've had to do a lot of plpgsql rewriting to avoid memory
exhaustion due to calling the functions multiple times in the one session.
Specifically, I've found that huge memory leaks occur when variables are
re-assigned based on a previous value (ie var := var + 1), and also when
strings are concatenated. Worse still is when you use the concatenation to
append to an existing variable.

Careful coding (plus extra memory and swap space!) has allowed us to still
be using Postgres, but it is a bit worrying that plpgsql can't even do
i:=i+1 reliably. It would be nice to know if this could be addressed prior
to the 7.1 release.

Regards,
Chris Knight
Systems Administrator
AIMS Independent Computer Professionals
Tel: +61 3 6334 6664 Fax: +61 3 6331 7032 Mob: +61 419 528 795
Web: http://www.aims.com.au

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-08-21 05:30:23 Re: regex back-references?
Previous Message Michael Blakeley 2000-08-20 22:39:36 regex back-references?