Received: from cwcom.net (email.cwci.net [195.44.0.104] (may be forged)) by hub.org (8.10.1/8.10.1) with ESMTP id e67JsmW01347 for ; Fri, 7 Jul 2000 15:54:48 -0400 (EDT) Received: from cwcom.net ([195.44.0.101]) by cwcom.net with Microsoft SMTPSVC(5.5.1877.387.38); Fri, 7 Jul 2000 20:54:46 +0100 From: tim.brookes@cwcom.net Reply-to: tim.brookes@cwcom.net To: pgsql-interfaces@postgresql.org Date: Fri, 7 Jul 2000 20:54:18 +0100 Subject: curious memory leak X-Mailer: DMailWeb Web to Mail Gateway 2.4e, http://netwinsite.com/top_mail.htm Message-id: <3966356a.6612.0@cwcom.net> X-User-Info: 195.74.96.27 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Archive-Number: 200007/49 I recently had problems with memory leaks when connecting to a postgres backend. The application and the backend both eat memory. Tom Lane help me with this problem and he found geprotobyname to be the problem as the leak only seemed to be a problem when connecting over a tcp/ip connection. However here are my new findings using v7.02 void callproc(){ PgDatabase* loStatsdb; loStatsdb = new PgDatabase("") delete loStatsdb; }; main(){ while(1){ callproc(); }; }; database name is set as environment variable. Starting the postmaster either with or without -i to enable tcp/ip connections and running this code both locally and over tcp/ip the postmaster backend leaks memory. The application now remains stable and has no memory leak. Rgds Tim Brookes