X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 73DC29FA42B for ; Sun, 14 May 2006 06:27:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 06788-08 for ; Sun, 14 May 2006 06:27:14 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from pgfoundry.org (pgfoundry.org [200.46.204.130]) by postgresql.org (Postfix) with ESMTP id DDF229FA1F1 for ; Sun, 14 May 2006 06:27:14 -0300 (ADT) Received: from localhost (mx1.hub.org [200.46.208.251]) by pgfoundry.org (Postfix) with ESMTP id D17D886C53F; Sun, 14 May 2006 09:27:14 +0000 (UTC) Received: from pgfoundry.org ([200.46.204.130]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 21157-04; Sun, 14 May 2006 06:27:06 -0300 (ADT) Received: by pgfoundry.org (Postfix, from userid 80) id CFDBD86C541; Sun, 14 May 2006 09:27:06 +0000 (UTC) To: noreply@pgfoundry.org From: Subject: [ psqlodbc-Bugs-1000619 ] Possible memory leaks during execution of INSERT and UPDATE statements. Content-type: text/plain; charset=UTF-8 Message-Id: <20060514092706.CFDBD86C541@pgfoundry.org> Date: Sun, 14 May 2006 09:27:06 +0000 (UTC) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/29 X-Sequence-Number: 7700 Bugs item #1000619, was opened at 2006-04-25 13:43 You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000619&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 view("event"); // build an inserter for the view DBView::insert_iterator loggingInserter = view; 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=1000619&group_id=1000125