Re: [HACKERS] Memory leaks? - Mailing list pgsql-hackers

From Maurice Gittens
Subject Re: [HACKERS] Memory leaks?
Date
Msg-id 017601bd3894$0fa79c80$fcf3b2c2@caleb..gits.nl
Whole thread Raw
List pgsql-hackers
>Well, this means that problem lies in large objects...
>I never used them... I assume that new relation and index
>is created for each LO. If this is right then we have memory leak
>in relation cache (heap_close doesn't flush relation from cache).
>Also, as I see now, LO interface uses its own memory context:
>TBL_FREE_CMD_MEMORY can't help here -> all allocation must be
>freed "manually".
>
>Unfortunately, I haven't time...
>


OK, part of the problem might be the lo_create function which
creates a large object using the functions inv_create and
inv_close.

inv_create uses TupleDescInitEntry to create tuple descriptors (I think)
but it never seems to free these tuple descriptors.

The function FreeTupleDesc seems to have been created for this purpose.
As I'm new to postgresql this I'm wondering if I'm on the right track.

Anyway I'll give it a try and see if the problem goes a way.

Regards,
 Maurice


pgsql-hackers by date:

Previous
From: sferac@bo.nettuno.it
Date:
Subject: Re: [QUESTIONS] Error on PostgreSQL agregate SUM() function??
Next
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: Re: [HACKERS] CREATE FUNCTION broken