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

Re: wip: functions median and percentile

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: wip: functions median and percentile
Date: 2010-10-01 14:43:47
Message-ID: 13146.1285944227@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-rrreviewers
Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> writes:
> 2010/10/1 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> If this patch tries to force the entire sort to happen in memory,
>> it is not committable.

> What about array_agg()? Doesn't it exceed memory even if the huge data come in?

Yeah, but for array_agg the user should be expecting a result of
approximately the size of the whole input, so if he overruns memory he
hasn't got a lot of room to complain.  There is no reason for a user to
expect that median or percentile will fall over on large input, and
every reason to expect them to be more robust than that.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2010-10-01 14:44:44
Subject: Re: wip: functions median and percentile
Previous:From: Robert HaasDate: 2010-10-01 14:41:39
Subject: Re: recovery.conf location

pgsql-rrreviewers by date

Next:From: Robert HaasDate: 2010-10-01 14:44:44
Subject: Re: wip: functions median and percentile
Previous:From: Hitoshi HaradaDate: 2010-10-01 14:11:08
Subject: Re: wip: functions median and percentile

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