Re: Memory leak in Pl/Python

From: Andrey Zhidenkov <andrey(dot)zhidenkov(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Memory leak in Pl/Python
Date: 2016-06-25 07:30:17
Message-ID: CAJw4d1VrAy-eOAARu16jOV8=iAWC4MFz_CZOKh7TQQhLi4_Law@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I found commit, that fixes some memory leaks in 9.6 beta 2:
https://github.com/postgres/postgres/commit/8c75ad436f75fc629b61f601ba884c8f9313c9af#diff-4d0cb76412a1c4ee5d9c7f76ee489507

I'm interesting in how Tom Lane check that is no more leaks in plpython?

On Sat, Jun 25, 2016 at 4:54 AM, Andrey Zhidenkov
<andrey(dot)zhidenkov(at)gmail(dot)com> wrote:
> For test I wrote script in Python, which calls a test function via psycopg2:
>
> #!/usr/bin/env python2
>
> import psycopg2
>
> conn = psycopg2.connect('xxx')
>
> cursor = conn.cursor()
>
> cursor.execute('set application_name to \'TEST\'')
>
> for i in range(1, 1000000):
> cursor.execute('select test()')
> conn.commit()
>
>
> I see memory consumption in htop and pg_activity tools.
>
> On Sat, Jun 25, 2016 at 2:00 AM, David G. Johnston
> <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>> On Fri, Jun 24, 2016 at 6:41 PM, Andrey Zhidenkov
>> <andrey(dot)zhidenkov(at)gmail(dot)com> wrote:
>>>
>>> For example, when I call this procedure
>>> many times,
>>
>>
>> Call how? Specifically, how are you handling transactions in the calling
>> client? And what/how are you measuring memory consumption?
>>
>> David J.
>>
>
>
>
> --
> Andrey Zhidenkov / Database developer
> +79265617190/ andrey(dot)zhidenkov(at)gmail(dot)com
>
>
>
>
> This e-mail message may contain confidential or legally privileged
> information and is intended only for the use of the intended
> recipient(s). Any unauthorized disclosure, dissemination,
> distribution, copying or the taking of any action in reliance on the
> information herein is prohibited. E-mails are not secure and cannot be
> guaranteed to be error free as they can be intercepted, amended, or
> contain viruses. Anyone who communicates with us by e-mail is deemed
> to have accepted these risks. Company Name is not responsible for
> errors or omissions in this message and denies any responsibility for
> any damage arising from the use of e-mail. Any opinion and other
> statement contained in this message and any attachment are solely
> those of the author and do not necessarily represent those of the
> company.

--
Andrey Zhidenkov / Database developer
+79265617190/ andrey(dot)zhidenkov(at)gmail(dot)com

This e-mail message may contain confidential or legally privileged
information and is intended only for the use of the intended
recipient(s). Any unauthorized disclosure, dissemination,
distribution, copying or the taking of any action in reliance on the
information herein is prohibited. E-mails are not secure and cannot be
guaranteed to be error free as they can be intercepted, amended, or
contain viruses. Anyone who communicates with us by e-mail is deemed
to have accepted these risks. Company Name is not responsible for
errors or omissions in this message and denies any responsibility for
any damage arising from the use of e-mail. Any opinion and other
statement contained in this message and any attachment are solely
those of the author and do not necessarily represent those of the
company.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-06-25 07:33:44 Re: Rename max_parallel_degree?
Previous Message Amit Kapila 2016-06-25 03:14:32 Re: Hash Indexes