Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJEoC-0005cS-UA for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Dec 2016 07:26:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cJEoC-0002mP-HG for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Dec 2016 07:26:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cJEnX-00022E-SX for pgsql-bugs@postgresql.org; Tue, 20 Dec 2016 07:25:20 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cJEnU-0002oe-Uh for pgsql-bugs@postgresql.org; Tue, 20 Dec 2016 07:25:18 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 6C79920945; Tue, 20 Dec 2016 02:25:15 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Tue, 20 Dec 2016 02:25:15 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=t+LOTwTWgt0qB4 CeyqO0d/ZD5Jc=; b=l6oMYUnVD9+iJsN76SLTFPSlQW6gstBFjFMnp+oBKRzE79 SONOb4RYRj0VjBQjhQ7OjM+rLfjF7Rbsf6if9tYyMJJWn7ymw1aiOjbYMuT435Ec DF4nuhYY8bRrAH4SJ0ndEa7yv5Wu4MtYuGiakywrAjIXT+31ZYzMMzp8uQZnM= X-ME-Sender: X-Sasl-enc: fRoGkq1MyyRJm0zXsT/bAEdIgWMlVuV/JjnG90ggC12R 1482218715 Received: from intern.anarazel.de (p549f0ad1.dip0.t-ipconnect.de [84.159.10.209]) by mail.messagingengine.com (Postfix) with ESMTPA id 23BD57E926; Tue, 20 Dec 2016 02:25:15 -0500 (EST) Date: Mon, 19 Dec 2016 23:25:13 -0800 From: Andres Freund To: Heikki Linnakangas Cc: Tom Lane , Pg Bugs , David Rowley Subject: Re: Crash with a CUBE query on 9.6 Message-ID: <20161220072513.qmp2holifj2yqnzb@alap3.anarazel.de> References: <4846.1482176240@sss.pgh.pa.us> <8821dc7b-50e0-b983-1590-344108b20855@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8821dc7b-50e0-b983-1590-344108b20855@iki.fi> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hi, On 2016-12-19 22:49:10 +0200, Heikki Linnakangas wrote: > On 12/19/2016 09:37 PM, Tom Lane wrote: > > Heikki Linnakangas writes: > > > The attached test case crashes on REL9_6_STABLE and master. On 9.5, it > > > worked. > > > > As best I can tell, this is the fault of commit 804163bc2. > > Oh, the ball is right back in my court, then. > Yes, that seems straightforward. I came up with the attached. Will commit > tomorrow, barring objections. No objections. But an observation about how the code evolved lately (partially by me, don't get me wrong): I think we've too much smarts at execution time. IMO deduplicating transition states and such should much rather done at plan time, and if we do it right we'd also get rid of the uggly way AggState->aggs is built up... Andres -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs