pgsql: Fix some infelicities in EXPLAIN output for parallel query plans - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix some infelicities in EXPLAIN output for parallel query plans
Date
Msg-id E1bIOKN-0004Gi-6e@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix some infelicities in EXPLAIN output for parallel query plans.

In non-text output formats, parallelized aggregates were reporting
"Partial" or "Finalize" as a field named "Operation", which might be all
right in the absence of any context --- but other plan node types use that
field to report SQL-visible semantics, such as Select/Insert/Update/Delete.
So that naming choice didn't seem good to me.  I changed it to "Partial
Mode".

Also, the field did not appear at all for a non-parallelized Agg plan node,
which is contrary to expectation in non-text formats.  We're notionally
producing objects that conform to a schema, so the set of fields for a
given node type and EXPLAIN mode should be well-defined.  I set it up to
fill in "Simple" in such cases.

Other fields that were added for parallel query, namely "Parallel Aware"
and Gather's "Single Copy", had not gotten the word on that point either.
Make them appear always in non-text output.

Also, the latter two fields were nominally producing boolean output, but
were getting it wrong, because bool values shouldn't be quoted in JSON or
YAML.  Somehow we'd not needed an ExplainPropertyBool formatting subroutine
before 9.6; but now we do, so invent it.

Discussion: <16002.1466972724@sss.pgh.pa.us>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8ebb69f85445177575684a0ba5cfedda8d840a91

Modified Files
--------------
src/backend/commands/explain.c                | 42 ++++++++++++++++++---------
src/include/commands/explain.h                |  2 ++
src/test/regress/expected/insert_conflict.out |  4 ++-
3 files changed, 33 insertions(+), 15 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Update rules.out to match commit 9ed551e0a.
Next
From: Tom Lane
Date:
Subject: pgsql: Dodge compiler bug in Visual Studio 2013.