Re: Memory growth observed with C++ application consuming libpq.dll on Windows - Mailing list pgsql-hackers

From Yasir
Subject Re: Memory growth observed with C++ application consuming libpq.dll on Windows
Date
Msg-id CAA9OW9fo38Fi31vPN8YDxo43kwpaUjupB+mV-tA+Mtf9nNf0hA@mail.gmail.com
Whole thread Raw
In response to Memory growth observed with C++ application consuming libpq.dll on Windows  (Rajesh Kokkonda <rajeshk.kokkonda@gmail.com>)
Responses Re: Memory growth observed with C++ application consuming libpq.dll on Windows
List pgsql-hackers
Hi Rajesh, 

Can you please attach a sample code snippet showing libpq's functions being called? It will help to identify the libpq's functions to investigate further for a potential mem leak. 

Regards...

Yasir Hussain

On Thu, Aug 1, 2024 at 4:30 PM Rajesh Kokkonda <rajeshk.kokkonda@gmail.com> wrote:
Hi,

We are seeing a gradual growth in the memory consumption of our process on Windows. Ours is a C++ application that directly loads libpq.dll and handles the queries and functions. We use setSingleRowMethod to limit the number of rows returned simultaneously to the application. We do not observe any memory increase when the application is run on Linux. There is no code difference between Windows and Linux from the application standpoint. We ran valgrind against our application on Linux and found no memory leaks. Since the same code is being used on Windows as well, we do not suspect any memory leak there.  The question is if there are any known memory leaks with the version of the library we are using on Windows. Kindly let us know.

The version of the library on Linux is libpq.so.5.16

The windows version of the library is 16.0.3.0


image.png

Thanks,
Rajesh
Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Conflict detection and logging in logical replication
Next
From: Robert Haas
Date:
Subject: Re: can we mark upper/lower/textlike functions leakproof?