Re: Crash with a CUBE query on 9.6

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Subject: Re: Crash with a CUBE query on 9.6
Date: 2016-12-19 21:22:24
Message-ID: 21373.1482182544@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
> On 12/19/2016 09:37 PM, Tom Lane wrote:
>> Probably, the loop in finalize_aggregates needs to be split into two,
>> one over the pertrans states and then a second one over the peragg states.
>> But this code has been hacked up enough since I last looked at it that
>> I'm hesitant to try to fix it myself.

> Yes, that seems straightforward. I came up with the attached. Will
> commit tomorrow, barring objections.

Code patch looks reasonable, but I do not get a crash on the proposed test
case with current code. I suspect that integer avg() and sum() don't
actually share transstates, making the test case a bit off-point.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Keith Fiske 2016-12-19 21:47:00 Re: 9.6rc1 Background worker starting multiple times
Previous Message Heikki Linnakangas 2016-12-19 20:49:10 Re: Crash with a CUBE query on 9.6