Re: [HACKERS] Memory grows without bounds in aggregates!

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: mcontzen(at)dohle(dot)com, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Memory grows without bounds in aggregates!
Date: 1999-03-29 16:03:08
Message-ID: 199903291604.LAA10369@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Michael Contzen <mcontzen(at)dohle(dot)com> writes:
> > [ out of memory for ]
> > stamm=> select sum(ekumsatz), sum(vkumsatz),sum(lvkumsatz),count(*) from
> > west0;
>
> Right, this is an instance of a known problem (palloc'd temporaries for
> aggregate functions aren't freed until end of statement). I think
> someone was looking into a quick-hack patch for aggregates, but there
> are comparable problems in evaluation of WHERE expressions, COPY, etc.
> We really need a general-purpose solution, and that probably won't
> happen till 6.6.
>
> In the meantime, I expect that doing only one float8 sum() per select
> would take a third as much memory --- you might find that that's an
> adequate workaround for the short run.
>

I thought we fixed this recently with that aggregate patch?

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-03-29 16:04:46 Re: [COMMITTERS] 'pgsql/src/backend/access/heap heapam.c't
Previous Message Bruce Momjian 1999-03-29 15:59:13 Re: [HACKERS] Parser doesn't grok unqualified array element