Memory leak in Pl/Python - Mailing list pgsql-hackers

From Andrey Zhidenkov
Subject Memory leak in Pl/Python
Date
Msg-id CAJw4d1Xj7HqqWwpsPsPbuVEhjQo49vfW7j3BVaA=GyvWjdW+Hw@mail.gmail.com
Whole thread Raw
Responses Re: Memory leak in Pl/Python  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
I have postgresql 9.4.8 on my server and I've noticed always growing
memory when I use plpython. I've made some tests and find a few
situations, when memory leaks. For example, when I call this procedure
many times, I can see an always growing memory:

create or replace
function test() returns bigint as $$

plpy.execute("insert into test(test) values ('test')")

return 1

$$ language plpythonu;

Interestingly, when I use not-modifying data query ('select 1') as
argument of execute(), a leak stops.

How can I fix/avoid this?



pgsql-hackers by date:

Previous
From: Gavin Flower
Date:
Subject: Re: Bug in to_timestamp().
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Bug in to_timestamp().