pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Parallelized polymorphic aggs, and aggtype vs aggoutputtype
Date: Thu, 16 Jun 2016 22:17:56 -0400
Message-ID: <22037.1466129876@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoaAjwaCRBe8w2UbpZD45uQ+TYwbLW7Dzf-e=VAq4m8q2w@mail.gmail.com>
References: <8229.1466109074@sss.pgh.pa.us>
	<CA+Tgmob7c6e7s4KOYsgrSk85D+pWmGrWMiRpqd0FK6RaXCYGxQ@mail.gmail.com>
	<14538.1466116810@sss.pgh.pa.us>
	<CA+TgmoaAjwaCRBe8w2UbpZD45uQ+TYwbLW7Dzf-e=VAq4m8q2w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Jun 16, 2016 at 6:40 PM, Tom Lane <tgl@sss.pgh.pa.us> 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



view thread (25+ messages)  latest in thread

Message-ID: <22037.1466129876@sss.pgh.pa.us>
Permalink:  ../22037.1466129876@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22037.1466129876@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, david.rowley@2ndquadrant.com
  Subject: Re: Parallelized polymorphic aggs, and aggtype vs aggoutputtype
  In-Reply-To: <22037.1466129876@sss.pgh.pa.us>
  References: <8229.1466109074@sss.pgh.pa.us> <CA+Tgmob7c6e7s4KOYsgrSk85D+pWmGrWMiRpqd0FK6RaXCYGxQ@mail.gmail.com> <14538.1466116810@sss.pgh.pa.us> <CA+TgmoaAjwaCRBe8w2UbpZD45uQ+TYwbLW7Dzf-e=VAq4m8q2w@mail.gmail.com> <22037.1466129876@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox