Patch for fixing a few memory leaks

From: Teodor Sigaev <teodor(at)stack(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Patch for fixing a few memory leaks
Date: 2001-10-04 15:59:41
Message-ID: 3BBC876D.4030609@stack.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)stack(dot)net

Attachment Content-Type Size
patch_dfmgr.gz application/octet-stream 1.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2001-10-04 16:08:07 Re: CVS changes
Previous Message Bruce Momjian 2001-10-04 15:45:09 Re: btree_gist regression test busted?