[ psqlodbc-Bugs-1000619 ] Possible memory leaks during execution of INSERT and UPDATE statements.
am 14.05.2006 11:27:06 von noreplyBugs item #1000619, was opened at 2006-04-25 13:43
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=10006 19&group_id=1000125
Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: Possible memory leaks during execution of INSERT and UPDATE statements.
Initial Comment:
I will use unicode PostgreSQL database version 8.0 on linux within the client application on W2K which use PostgreSQL Unicode driver version 08.01.0200 (default settings).
Client application use DTL (www.dtemplatelib.sourceforge.net) for SQL operations.
What I have found when application perfroms only SELECT statements merory usage is stable. However when I add INSERT or UPDATE statements the memory usage have been slowly increasing during all program execution. I have made the same tests using the MSSQL database and they show stable memory usage.
This convinces me that the most possible place of memory leaks is psqlODBC driver.
The C++ code below show how I use DTL for make insertion
DBView
// build an inserter for the view
DBView
LoggingRow loggingRow;
loggingRow.SetPersonID(personID);
loggingRow.SetStreamID(streamID);
loggingRow.SetLogEvent((int)logEvent);
loggingRow.SetIP(ip);
loggingRow.SetServerName(ServerName);
loggingRow.SetSecondsFromStart(secondsFromStart);
*loggingInserter = loggingRow;
loggingInserter++;
Commit();
This code generate next INSERT statement:
PREPARE "_PLAN00DC7D88"(int4, int4, int4, int4, varchar, varchar) as INSERT INTO EVENT (PERSON_ID, SECONDSFROMSTART, STREAM_ID, EVENTTYPE_ID, IPADDRESS, SERVERNAME) VALUES (($1), ($2), ($3), ($4), ($5), ($6));EXECUTE "_PLAN00DC7D88"(100,100,100,5,'0.0.0.0','test server')
Making 5000 simple INSERTS (console application just call the method which make insert 5000 times) into database increases memory usage of console application by more than 800Kb. The statistic below shows example of memory usage by console application (I used "Private Bytes" counter in perfom).
16:25:11.872","3993600"
16:25:12.872","4009984"
16:25:13.872","4030464"
16:25:14.872","4050944"
16:25:15.872","4075520"
16:25:16.872","4096000"
16:25:17.872","4112384"
16:25:18.872","4132864"
16:25:19.872","4153344"
16:25:20.872","4173824"
16:25:21.872","4198400"
16:25:22.872","4218880"
------------------------------------------------------------ ----------
>Comment By: Dave Page (dpage)
Date: 2006-05-14 09:27
Message:
No response
------------------------------------------------------------ ----------
Comment By: Dave Page (dpage)
Date: 2006-04-28 09:11
Message:
Please test version 08.02.0002 (available from http://pgfoundry.org/frs/?group_id=1000125) and report whether or not the problem still exists.
------------------------------------------------------------ ----------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=10006 19&group_id=1000125
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org