Search Postgresql Archives

Re: Memory Issue with array_agg?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



## Robert Sosinski (rsosinski@xxxxxxxxxxxxxxxxxxx):

> When using array_agg on a large table, memory usage seems to spike up until
> Postgres crashes with the following error:

This sounds like bug #7916.
http://www.postgresql.org/message-id/E1UCeEU-0004hY-Pq@xxxxxxxxxxxxxxxxxxxxxxx
As noted in that thread, changing the AllocSet parameters for
acummArrayResult may help (call to AllocSetContextCreate() in
ArrayBuildState *accumArrayResult(), src/backend/utils/adt/arrayfuncs.c,
change ALLOCSET_DEFAULT_*SIZE to ALLOCSET_SMALL_*SIZE).
Also, lowering work_mem may help, depending on your SQL.

Regards,
Christoph

-- 
Spare Space


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux