From: | Rajesh Kokkonda <rajeshk(dot)kokkonda(at)gmail(dot)com> |
---|---|
To: | Yasir <yasir(dot)hussain(dot)shah(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Memory growth observed with C++ application consuming libpq.dll on Windows |
Date: | 2024-08-02 11:45:39 |
Message-ID: | CAM4OfG2Hy-nZ_zt_8hAVqi7PM-GXegpZVszXL_FjdS4w4k_r7g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Okay. I will try to create one sample program and send it to you sometime
next week. In the meantime, I am listing down all the methods we are
consuming from libpq.
PQconnectdbParams
PQstatus
PQerrorMessage
PQpingParams
PQfinish
PQresultStatus
PQclear
PQsetSingleRowMode
PQntuples
PQnfields
PQftype
PQgetvalue
PQgetlength
PQgetisnull
PQgetCancel
PQfreeCancel
PQcancel
PQsetErrorVerbosity
PQsendPrepare
PQsendQueryPrepared
PQgetResult
PQconsumeInput
PQisBusy
PQsetnonblocking
PQflush
PQsocket
PQtransactionStatus
PQresultErrorField
Regards,
Rajesh
On Fri, Aug 2, 2024 at 5:06 PM Yasir <yasir(dot)hussain(dot)shah(at)gmail(dot)com> wrote:
>
> On Fri, Aug 2, 2024 at 1:53 PM Rajesh Kokkonda <rajeshk(dot)kokkonda(at)gmail(dot)com>
> wrote:
>
>> Hi Yasir,
>>
>> Are you looking for a fully functional sample program or only the APIs
>> from libpq library that our product uses? I am asking this because if the
>> requirement is to have a sample code, then I will have to work on creating
>> one on the same lines as our product.
>>
>>
> A functional sample is always best and preferred, however, only APIs used
> by your product would also be sufficient.
>
> Rajesh
>>
>> On Thu, Aug 1, 2024 at 5:27 PM Yasir <yasir(dot)hussain(dot)shah(at)gmail(dot)com>
>> wrote:
>>
>>> 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(dot)kokkonda(at)gmail(dot)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: image.png]
>>>>
>>>> Thanks,
>>>> Rajesh
>>>>
>>>
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2024-08-02 12:07:40 | Re: CI, macports, darwin version problems |
Previous Message | Amul Sul | 2024-08-02 11:43:02 | Re: pg_verifybackup: TAR format backup verification |