Re: plpython memory leak uppon empty resultsets in all versions
От | Andres Freund |
---|---|
Тема | Re: plpython memory leak uppon empty resultsets in all versions |
Дата | |
Msg-id | 201005012000.35017.andres@anarazel.de обсуждение исходный текст |
Ответ на | Re: plpython memory leak uppon empty resultsets in all versions (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-bugs |
Hi, On Saturday 01 May 2010 19:08:40 Tom Lane wrote: > Andres Freund <andres@anarazel.de> writes: > > while true; do echo 'DO LANGUAGE plpythonu $$import > > gc;gc.collect();plpy.execute("SELECT unknown"); $$;';done|psql -h /tmp -p > > 5433 postgres > > I tried this and found there was still a leak after applying your patch. > What seems like the correct thing is to use PLy_procedure_delete(), > as in the attached applied patch. With this, I see zero leak rate for > either this test or the no-error-thrown variant. Yes, I am not surprised. I havent read enough of the code to really understand its codepaths. I didnt find it exactly obvious what happens where and when what happens... Thanks for really fixing the issue. At times a sql level function that returns the current heap size would be rather neat for writing minimal regression tests for such things would be kinda neat. But likely it would increase the runtime a bit too much and would be hard to implement cross-platformish... Andres
В списке pgsql-bugs по дате отправления: