Re: [HACKERS] backend dies suddenly after a lot of error messages
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jwieck@debis.com (Jan Wieck)
Cc: pgsql-hackers@postgreSQL.org
Date: 1999-05-13T00:33:36Z
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