dbTalk Databases Forums  

SPI memory managment issue

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss SPI memory managment issue in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bsimon@loxane.com
 
Posts: n/a

Default SPI memory managment issue - 03-03-2004 , 06:35 AM






I've read in the doc that every memory allocation done in a spi memory
context was freed at the end of the context (after spi_finish)
What happens if the context is is initialized inside another one ?

Here is my function :

spi_connect()

execute query1;
...
execute query10;

spi_finish()

The thing is that I do another spi_connect inside all subqueries (query1
.... query10) and the memory allocated inside all "subcontext" doesn't
seems to be freed until the last call of spi_finish. (the one of the
"big" function).

Hopefully I was clear enough
Any help ?

Benjamin.

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: SPI memory managment issue - 03-03-2004 , 09:08 AM






bsimon (AT) loxane (DOT) com writes:
Quote:
The thing is that I do another spi_connect inside all subqueries (query1
... query10) and the memory allocated inside all "subcontext" doesn't
seems to be freed until the last call of spi_finish. (the one of the
"big" function).
No, spi_finish frees memory used in that particular SPI invocation.
What's your evidence for thinking otherwise?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.