Memory leak with palloc
От | Han Holl |
---|---|
Тема | Memory leak with palloc |
Дата | |
Msg-id | 200211291516.30424.han.holl@prismant.nl обсуждение исходный текст |
Ответы |
Re: Memory leak with palloc
|
Список | pgsql-general |
Hello, Let's say I want to run select count(column1) as column1, count(column2) as column2, ... count(column228) as column228 from aview; coulumni are really function calls that return a computed text that is palloc'd. Postgres seems to free the palloc'd memory at the end of the select statement, which means that the above query may of may not succeed depending on machine size, database size and amount of memory allocated. Is there a way (and if there isn't, should there be) to tell postgres either: 1. Please release this memory when you're done with this record. or 2. Here is a pointer to static memory. Please don't free. Both would solve my problem (and I guess 2 would be the more efficient). Cheers, Han Holl PS The above query failed very quickly indeed on Postgres 7.2.3, (due to memory exhaustion,) which seems to have a additional memory leak of it's own. On 7.3RC2 it's running fine but consuming memory at a steady rate (from 10M to 115M in 35 minutes, with 1.3G virtual memory I', confident that it will complete).
В списке pgsql-general по дате отправления: