BUG #5608: array_agg() consumes too much memory

Поиск
Список
Период
Сортировка
От Itagaki Takahiro
Тема BUG #5608: array_agg() consumes too much memory
Дата
Msg-id 201008090941.o799fCCF057912@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #5608: array_agg() consumes too much memory  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      5608
Logged by:          Itagaki Takahiro
Email address:      itagaki.takahiro@gmail.com
PostgreSQL version: 9.0beta4
Operating system:   Windows 7 (32bit)
Description:        array_agg() consumes too much memory
Details:

I encountered "out of memory" error in large
GROUP BY query with array_agg(). The server log
was filled by the following messages:

    accumArrayResult: 8192 total in 1 blocks; 7800 free (0 chunks); 392
used

Should we choose smaller size of initial memory in accumArrayResult()?
It allocates ALLOCSET_DEFAULT_INITSIZE (=8kB) now,
but only 10% of the area was used in my case.

Note that work_mem is not considered in the case;
array_agg() allocates 8kB * (number of groups).

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

Предыдущее
От: Patric de Waha
Дата:
Сообщение: Automated analyze process fails with custom function, which works perfect as regular user (8.4.2).
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Assertion failure with assignment to array elem