a bug that might be related to BUG #1739 - Mailing list pgsql-bugs

From Tzahi Fadida
Subject a bug that might be related to BUG #1739
Date
Msg-id 009a01c58024$653642c0$0b00a8c0@llord
Whole thread Raw
Responses Re: a bug that might be related to BUG #1739  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I am writing C functions and I use SPI extensively.
Till now I used cursors and there was no memory leaks.
But now I do thousands of inserts using SPI_execp
and I also give it parameters.
Now, when I execute the insert about 50-100 times I loose
around 100kb memory and SPI_finish() does not release this
memory (although I really can't do SPI finish in normal executions
all the time since I have open cursors).
I tried spipush connect query finish pop. but the leak stays.
I really need this resolved since I can reach a million runs
in my functions and thus my whole memory can be depleted.

I use 8.0.3

Another clue. The relation I am adding to have a unique index.
If I do about 100 inserts and the relation have the index I loose around
100kb.
without the index on the relation I loose around 40kb.

Btw, execp with selects also looses memory. Only cursors seems immune to
this.
Please help,
    10x.


Regards,
    tzahi.

WARNING TO SPAMMERS:  see at
http://members.lycos.co.uk/my2nis/spamwarning.html

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1739: memory leak in pl/perl with spi_exec_query
Next
From: Tom Lane
Date:
Subject: Re: a bug that might be related to BUG #1739