Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDjMG-0004t5-8g for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jun 2016 02:18:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bDjMF-0007LL-NV for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jun 2016 02:18:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bDjMF-0007LF-9x for pgsql-hackers@postgresql.org; Fri, 17 Jun 2016 02:18:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bDjM7-00089k-2j for pgsql-hackers@postgresql.org; Fri, 17 Jun 2016 02:18:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u5H2HuYJ022038; Thu, 16 Jun 2016 22:17:56 -0400 From: Tom Lane To: Robert Haas cc: David Rowley , "pgsql-hackers@postgresql.org" Subject: Re: Parallelized polymorphic aggs, and aggtype vs aggoutputtype In-reply-to: References: <8229.1466109074@sss.pgh.pa.us> <14538.1466116810@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Thu, 16 Jun 2016 22:03:29 -0400" Date: Thu, 16 Jun 2016 22:17:56 -0400 Message-ID: <22037.1466129876@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas writes: > On Thu, Jun 16, 2016 at 6:40 PM, Tom Lane wrote: >> Meh. I think this is probably telling us that trying to repurpose Aggref >> as the representation of a partial aggregate may have been mistaken. > I don't mind if you feel the need to refactor this. I'm not sure yet. What I think we need to work out first is exactly how polymorphic parallel aggregates ought to identify which concrete data types they are using. There were well-defined rules before, but how do we adapt those to two levels of aggregate evaluation? Are we hard-wiring an assumption that the aggregate transtype is the same at both levels? What assumptions do we want to make about the relationship of the data transfer type (the lower level's output type) to the polymorphic input and trans types? A key point here is that the way that polymorphic aggregate support functions used to find out what they were doing is that we'd set up dummy FuncExprs that would satisfy get_call_expr_argtype(). That relied on the fact that the transfn and finalfn calls were specified in a way that corresponded to legal SQL function calls. It's not clear to me whether that statement still holds for parallelized aggregates. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers