Re: Non-text EXPLAIN output for partial aggregation

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Non-text EXPLAIN output for partial aggregation
Date: 2016-06-27 15:45:13
Message-ID: CA+TgmoaFRpxPem_Zb5JDg36kYN3JYmXtYHhx8uac0QBPiRNvRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 26, 2016 at 4:25 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I noticed that the EXPLAIN code is set up so that in non-text output
> modes, you get output like this for partial-aggregate plans:
>
> "Node Type": "Aggregate", +
> "Strategy": "Plain", +
> "Operation": "Finalize", +
> ...
> "Node Type": "Aggregate", +
> "Strategy": "Plain", +
> "Operation": "Partial", +
>
> That is, the "Operation" field type has been commandeered to indicate
> partial-aggregation cases. This seems like a pretty bad idea to me,
> for two reasons:
>
> 1. In other plan node types, "Operation" refers to SQL-visible semantics,
> in fact always Select/Insert/Update/Delete. Re-using it for an
> implementation detail doesn't seem very consistent.
>
> 2. As coded, the field is not printed at all for a non-partial aggregate
> node. This is just wrong. A given node type should have a fixed set of
> attributes.
>
> I think we should use some other field name, maybe "Step" or
> "PartialMode", and have "Simple" or "Plain" as the default field
> contents. It's also arguable that this field should distinguish all the
> values of the AggSplit enum we just invented, though I'm not sure how
> important it is to report serialization options. I'm not wedded to any
> particular ideas here, other than that omitting the field in the simple
> case is bad.
>
> Comments, naming ideas?

Simple sounds better than Plain, as between the two of them, because
Plain already means something with respect to aggregates.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-06-27 15:59:55 Re: Bug in to_timestamp().
Previous Message Tom Lane 2016-06-27 15:24:21 Re: OpenSSL 1.1 breaks configure and more