where are the memory leaks?

From: Markus Wagner <wagner(at)imsd(dot)uni-mainz(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: where are the memory leaks?
Date: 2001-10-22 07:37:02
Message-ID: 01102209370302.02894@magnus
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

we have an application that should insert about 1 Million records into a
table. For each record there are some complex SELECT-statements that look for
"similar" records, and one INSERT-statement. The whole handling for one
record is encapsulated within "BEGIN" and "END".

The thing is that the process is "killed" after about 12000 records.

The postgres log file says something like "out of memory".

First, we thought of some memory-related programming mistakes in our code. We
checked that with a counter that is modified by allocation and deallocation
functions. So we can be sure for 90 % that there is no mistake.

We also made sure that each PGResult pointer is cleared when it is not used
anymore. But still the program is killed.

Now we are wondering if there are other things in the pg library (libpq) that
need to be freed, e. g. what about the return value of PQgetvalue?

What else could we do to find the memory leaks?

Thank you,

Markus

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Samuels 2001-10-22 08:24:08 Case problem
Previous Message Thomas Lockhart 2001-10-22 05:56:54 Re: [GENERAL] To Postgres Devs : Wouldn't changing the select limit