Re: [HACKERS] backend dies suddenly after a lot of error messages

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jwieck(at)debis(dot)com (Jan Wieck)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] backend dies suddenly after a lot of error messages
Date: 1999-05-13 00:33:36
Message-ID: 3125.926555616@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 1999-05-13 01:09:10 Re: [HACKERS] backend dies suddenly after a lot of error messages
Previous Message David Wetzel 1999-05-12 23:41:29 Re: [PORTS] Re: [HACKERS] backend closed the channel unexpectedly