8000 Fix show_incremental_sort_info with force_parallel_mode · postgrespro/postgres@7d6d82a · GitHub
[go: up one dir, main page]

Skip to content
  • Commit 7d6d82a

    Browse files
    committed
    Fix show_incremental_sort_info with force_parallel_mode
    When executed with force_parallel_mode=regress, the function was exiting too early and thus failed to print the worker stats. Fixed by making it more like show_sort_info. Discussion: https://postgr.es/m/CAPpHfds1waRZ=NOmueYq0sx1ZSCnt+5QJvizT8ndT2=etZEeAQ@mail.gmail.com
    1 parent d2d8a22 commit 7d6d82a

    File tree

    1 file changed

    +11
    -8
    lines changed

    1 file changed

    +11
    -8
    lines changed

    src/backend/commands/explain.c

    Lines changed: 11 additions & 8 deletions
    Original file line numberDiff line numberDiff line change
    @@ -2880,19 +2880,22 @@ show_incremental_sort_info(IncrementalSortState *incrsortstate,
    28802880

    28812881
    fullsortGroupInfo = &incrsortstate->incsort_info.fullsortGroupInfo;
    28822882

    2883-
    if (!(es->analyze && fullsortGroupInfo->groupCount > 0))
    2883+
    if (!es->analyze)
    28842884
    return;
    28852885

    2886-
    show_incremental_sort_group_info(fullsortGroupInfo, "Full-sort", true, es);
    2887-
    prefixsortGroupInfo = &incrsortstate->incsort_info.prefixsortGroupInfo;
    2888-
    if (prefixsortGroupInfo->groupCount > 0)
    2886+
    if (fullsortGroupInfo->groupCount > 0)
    28892887
    {
    2888+
    show_incremental_sort_group_info(fullsortGroupInfo, "Full-sort", true, es);
    2889+
    prefixsortGroupInfo = &incrsortstate->incsort_info.prefixsortGroupInfo;
    2890+
    if (prefixsortGroupInfo->groupCount > 0)
    2891+
    {
    2892+
    if (es->format == EXPLAIN_FORMAT_TEXT)
    2893+
    appendStringInfo(es->str, " ");
    2894+
    show_incremental_sort_group_info(prefixsortGroupInfo, "Presorted", false, es);
    2895+
    }
    28902896
    if (es->format == EXPLAIN_FORMAT_TEXT)
    2891-
    appendStringInfo(es->str, " ");
    2892-
    show_incremental_sort_group_info(prefixsortGroupInfo, "Presorted", false, es);
    2897+
    appendStringInfo(es->str, "\n");
    28932898
    }
    2894-
    if (es->format == EXPLAIN_FORMAT_TEXT)
    2895-
    appendStringInfo(es->str, "\n");
    28962899

    28972900
    if (incrsortstate->shared_info != NULL)
    28982901
    {

    0 commit comments

    Comments
     (0)
    0