curious memory leak - Mailing list pgsql-interfaces

From tim.brookes@cwcom.net
Subject curious memory leak
Date
Msg-id 3966356a.6612.0@cwcom.net
Whole thread Raw
List pgsql-interfaces
I recently had problems with memory leaks when connecting to a postgres backend.The application and the backend both
eatmemory.
 

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


pgsql-interfaces by date:

Previous
From: Jan Ehrhardt
Date:
Subject: password is readable in psqlodbc.log !!!
Next
From: teixeira@conectiva.com
Date:
Subject: Re: What does this error message mean??