Re: BUG #5608: array_agg() consumes too much memory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BUG #5608: array_agg() consumes too much memory
Date: 2010-08-14 13:30:49
Message-ID: 7547.1281792649@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> writes:
> 2010/8/14 Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>:
>> 2010/8/10 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>>> Eventually it might be nice to have some sort of way to specify the
>>> estimate to use for any aggregate function --- but for a near-term
>>> fix maybe we should just hard-wire a special case for array_agg in
>>> count_agg_clauses_walker().

> So, is it better to generalize as it adds ALLOCSET_DEFAULT_INITSIZE if
> the transtype is internal, rather than specifying individual function
> OID as the patch stands?

Seems like a good idea ... it's ugly, but it seems much less likely to
need maintenance.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-08-14 15:49:46 Re: BUG #5608: array_agg() consumes too much memory
Previous Message Tom Lane 2010-08-14 13:15:40 Re: BUG #5620: PostgreSQL won't accept the word "user" as a valid column name

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2010-08-14 13:47:57 Re: Re: [COMMITTERS] pgsql: Recognize functional dependency on primary keys.
Previous Message Tom Lane 2010-08-14 13:23:33 Re: Re: [COMMITTERS] pgsql: Recognize functional dependency on primary keys.