• Tom Lane's avatar
    Fix some infelicities in EXPLAIN output for parallel query plans. · 8ebb69f8
    Tom Lane authored
    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>
    8ebb69f8
insert_conflict.out 33.8 KB