Tim Brookes <tim(dot)brookes(at)mcmail(dot)com> writes:
> The procedure 'callproc' is called in a continuous loop to emphasise
> this problem. Within the procedure all that happens is a new database
> connection is made and deleted. On my system this eats memory at an
> enormous rate.
I could not reproduce such a leak with current sources.
It appears that you are using a fairly old Postgres release --- class
PgEnv hasn't existed since at least release 6.4.*, maybe earlier.
I'd suggest upgrading...
regards, tom lane