Patch for fixing a few memory leaks - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Patch for fixing a few memory leaks
Date
Msg-id 3BBC876D.4030609@stack.net
Whole thread Raw
Responses Re: Patch for fixing a few memory leaks
Re: Patch for fixing a few memory leaks
List pgsql-hackers
Patch fix memory leaks in src/backend/utils/fmgr/dfmgr.c .
This leaks is very significant with massive update/insert tables with gist
indexes in one transaction or with following sequence of commands:
1. COPY in table large number of row
2. CREATE GiST index on table
3. VACUUM ANALYZE
On third step postgres eats very big number of memory.
This patch fix it.

BTW
Tom, I want to notice that initGISTstate is called for every inserting value
(for each row). I think it's not good, because this function called 'fmgr_info'
7 times. 'fmgr_info' call a  'load_external_function' with execution of sequence
search on library name. Any suggestion?

--
Teodor Sigaev
teodor@stack.net


Attachment

pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: cvs problem
Next
From: Bruce Momjian
Date:
Subject: Re: cvs problem