Re: [HACKERS] backend dies suddenly after a lot of error messages - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] backend dies suddenly after a lot of error messages
Date
Msg-id 3125.926555616@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] backend dies suddenly after a lot of error messages  (jwieck@debis.com (Jan Wieck))
Responses Re: [HACKERS] backend dies suddenly after a lot of error messages  (Don Baccus <dhogaza@pacifier.com>)
List pgsql-hackers
>> Yeah, I'd say so --- all the memory used should get freed at transaction
>> end, but evidently it isn't happening.
>> 
>> I still see it with 6.5-current sources.  Will take a look.

Ah-ha, I think I see it: AtCommit_Memory releases memory in the blank
portal (by doing EndPortalAllocMode()).  AtAbort_Memory forgets to do so.
Will commit this fix momentarily.

>     I  remember  to  have  taken  some  but haven't found all the
>     places.  I think there's still something in  tcop  where  the
>     querytree list is malloc()'d.

That is a relatively minor leak, compared to leaking *all* memory
allocated in the failed transaction, which is what it was doing until
now :-(.  But I think I will fix it anyway ... the code is awfully
ugly, and it is still a leak.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "craig"
Date:
Subject: help
Next
From: Don Baccus
Date:
Subject: Re: [HACKERS] backend dies suddenly after a lot of error messages