Re: BUG #8451: quantile extension: memory corruption?

From: Tomas Vondra <tv(at)fuzzy(dot)cz>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8451: quantile extension: memory corruption?
Date: 2013-09-16 00:46:38
Message-ID: 523654EE.7000806@fuzzy.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 14.9.2013 14:12, Tomas Vondra wrote:
> On 13.9.2013 18:07, stephane(dot)wustner(at)lip6(dot)fr wrote:
>> The following bug has been logged on the website:
>>
>> Bug reference: 8451
>> Logged by: strexxx
>> Email address: stephane(dot)wustner(at)lip6(dot)fr
>> PostgreSQL version: 9.1.9
>> Operating system: Linux 3.8.0-27-generic #40-Ubuntu SMP x86_64
>> Description:
>>
>> A query such as this one
>> COPY (SELECT e,quantile(EXTRACT(EPOCH
>> FROM(d)),ARRAY[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1]) AS d FROM (SELECT
>> e,max(time)-min(time) AS d FROM bb RIGHT JOIN (SELECT s,e FROM ss RIGHT JOIN
>> (SELECT e FROM ee WHERE h ~* 'blah') AS i0 USING(e)) AS i0 USING
>> (sessionid) GROUP BY e,ei) AS i1 GROUP BY e) TO 'full_path/d.csv' WITH
>> CSV;"
>
> Hi,
>
> this seems like a bug in the "quantile" extension, which is developed
> and distributed completely separately from PostgreSQL. So pgsql-bugs is
> not the right place to report the issue.
>
> I reported the issue on github and I'll look into that today/tomorrow
>
> https://github.com/tvondra/quantile/issues/4
>
> so far it seems like a trivial bug in handling NULL values.

And indeed it was a bug in handling NULL values - the PG_ARGISNULL
happened too late. I plan to do few more improvements before pushing new
version to pgxn, but you may grab the sources from github directly.

Tomas

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Satoshi Nagayasu 2013-09-16 07:19:55 Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Previous Message prakash_panda 2013-09-15 17:54:06 BUG #8454: Process returned exit 0 message is showing while taking backup