From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@postgreSQL.org
Subject: Non-text EXPLAIN output for partial aggregation
Date: Sun, 26 Jun 2016 16:25:24 -0400
Message-ID: <16002.1466972724@sss.pgh.pa.us> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
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?
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
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
Subject: Re: Non-text EXPLAIN output for partial aggregation
In-Reply-To: <16002.1466972724@sss.pgh.pa.us>
References: <16002.1466972724@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