Skip site navigation (1) Skip section navigation (2)

Re: Aggregate-function space leakage

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Chris Spotts <rfusca(at)gmail(dot)com>
Subject: Re: Aggregate-function space leakage
Date: 2009-07-22 23:01:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Wed, Jul 22, 2009 at 10:14 PM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> The reason for that turns out to be that we deliberately lobotomized
> array_agg that way, just last month:
> in response to this problem:
> We need a better idea.

Rereading your diagnosis of Merlin Moncure's original problem I'm a
bit puzzled. Why do we have to rerun the final function when we rescan
the hash table? Surely the logical thing to do is to store the final
value in the hash table with some flag saying that value has been
finalized rather than to reexecute the final function every time it's

I'm not sure that really solves anything though since there's no
guarantee that the first scan was finished when it's reset so there
could still be unfinalized elements in the hash table. Would it be too
costly to finalize all the hash elements in a single pass before
returning any?


In response to


pgsql-hackers by date

Next:From: Jaime CasanovaDate: 2009-07-22 23:29:23
Subject: Re: Determining client_encoding from client locale
Previous:From: Tom LaneDate: 2009-07-22 21:35:37
Subject: Re: Aggregate-function space leakage

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group