Re: [BUGS] BUG #1736: endless loop in PQconnectdb

2005-07-03 Thread Karsten Desler
* Bruce Momjian wrote: > I think what you are seeing is that the getaddrinfo memory is placed in > the PGconn structure that isn't freed until PQclear is called. Does > your test call PQclear()? s/PQclear/PQfinish/ It does call PQclear on the result, and PQfinish on the connection. The code is at

Re: [BUGS] BUG #1736: endless loop in PQconnectdb

2005-07-03 Thread Tom Lane
Karsten Desler <[EMAIL PROTECTED]> writes: > * Bruce Momjian wrote: >> I think what you are seeing is that the getaddrinfo memory is placed in >> the PGconn structure that isn't freed until PQclear is called. Does >> your test call PQclear()? > s/PQclear/PQfinish/ > It does call PQclear on the re

Re: [BUGS] BUG #1748: Unique contraints cannot be added to long text fields

2005-07-03 Thread Alvaro Herrera
On Sat, Jul 02, 2005 at 05:20:29PM +0100, Greg Steffensen wrote: > I'm storing SVG files, which can be many kilobytes long, in a text field. > When I try to add a unique contraint to that field, or try to add a row to a > table that already has had the unique contraint applied, I get errors like

Re: [BUGS] BUG #1739: memory leak in pl/perl with spi_exec_query

2005-07-03 Thread Jean-Max Reymond
Jean-Max Reymond a écrit : Jean-Max Reymond a écrit : The following bug has been logged online: Bug reference: 1739 Logged by: Jean-Max Reymond Email address: [EMAIL PROTECTED] PostgreSQL version: 8.0.3 Operating system: Linux Ubuntu Description:memory leak in pl/

Re: [BUGS] BUG #1739: memory leak in pl/perl with spi_exec_query

2005-07-03 Thread Tom Lane
Jean-Max Reymond <[EMAIL PROTECTED]> writes: > I have run again my real plperl procedure and attach a gdb to the process. > a call MemoryContextStats(TopMemoryContext) gives me the results as above. > SPI Proc: 1015013376 total in 130 blocks; 1893336 free (0 chunks); > 1013120040 used Well, that

Re: [BUGS] BUG #1739: memory leak in pl/perl with spi_exec_query

2005-07-03 Thread Tom Lane
"Jean-Max Reymond" <[EMAIL PROTECTED]> writes: > So, spi_exec_query allocates memory but this memory is never released until > the end of the stored procedure. Ah, found it. regards, tom lane Index: plperl.c

[BUGS] a bug that might be related to BUG #1739

2005-07-03 Thread Tzahi Fadida
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

Re: [BUGS] a bug that might be related to BUG #1739

2005-07-03 Thread Tom Lane
Tzahi Fadida <[EMAIL PROTECTED]> writes: > 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. If SPI_execp leaked memory then so would almost any plpgsql f

Re: [BUGS] a bug that might be related to BUG #1739

2005-07-03 Thread Tzahi Fadida
Here it is. It could very well be in my code or a lack of understanding. I started from scratch and have written a small example. If it will also appear on your machine you should notice that you are loosing a few megabites in memory in a few secs. Maybe I am not freeing something or something lik

Re: [BUGS] BUG #1739: memory leak in pl/perl with spi_exec_query

2005-07-03 Thread Jean-Max Reymond
Tom Lane a écrit : "Jean-Max Reymond" <[EMAIL PROTECTED]> writes: So, spi_exec_query allocates memory but this memory is never released until the end of the stored procedure. Ah, found it. OK, it solves my problem. great job :-) thanks a lot Tom begin:vcard fn:Jean-Max Reymond n: