where are the memory leaks? - Mailing list pgsql-general

From Markus Wagner
Subject where are the memory leaks?
Date
Msg-id 01102209370302.02894@magnus
Whole thread Raw
Responses Re: where are the memory leaks?
List 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

pgsql-general by date:

Previous
From: Masaru Sugawara
Date:
Subject: Re: Sequence problems during restart
Next
From: "Ian Harding"
Date:
Subject: Re: How to insert with a serial