Re: Curing plpgsql's memory leaks for statement-lifespan values

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: Curing plpgsql's memory leaks for statement-lifespan values
Дата
Msg-id d7f3cc7b-ca8f-f9ab-edd9-a93195c6ce2a@BlueTreble.com
обсуждение исходный текст
Ответ на Re: Curing plpgsql's memory leaks for statement-lifespan values  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 8/19/16 10:42 AM, Tom Lane wrote:
> It appeared to me after collecting some stats about the functions present
> in the regression tests that for larger functions, the extra space eaten
> is just some small multiple (like 2x-3x) of the function body string
> length.  So it's not *that* much data, even for big functions, and it's
> only going to be eaten on the first usage of a function within a session.

I wonder if freeing that memory would help speed up further allocations, 
and how much of the expense of the final free for the context gets 
reduced by an early reset. Probably not enough to negate the cost of 
resetting on every call though...
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Corey Huinker
Дата:
Сообщение: Re: anyelement -> anyrange
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Exporting more function in libpq