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

From Bruce Momjian
Subject Re: Patch for fixing a few memory leaks
Date
Msg-id 200110041916.f94JG2513079@candle.pha.pa.us
Whole thread Raw
In response to Patch for fixing a few memory leaks  (Teodor Sigaev <teodor@stack.net>)
List pgsql-hackers
Patch applied.  Thanks.

> 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, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Barry Lind
Date:
Subject: Re: Timestamp, fractional seconds problem
Next
From: Tom Lane
Date:
Subject: Re: Patch for fixing a few memory leaks