BUG #16683: explain plan format xml produces invalid xml

Started by PG Bug reporting formover 5 years ago4 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 16683
Logged by: Frits Jalvingh
Email address: jal@etc.to
PostgreSQL version: 13.0
Operating system: Ubuntu 20.04
Description:

I am running an explain plan:
explain (format xml,analyze,costs,verbose,timing,buffers) .....
The result contains the following part which is invalid XML:

<Incremental-Sort-Groups>
<Group-Count>4</Group-Count>
<Sort-Methods-Used>
<Item>quicksort</Item>
</Sort-Methods-Used>
<Sort-Space>
<Average-Sort-Space-Used>30</Average-Sort-Space-Used>
<Peak-Sort-Space-Used>30</Peak-Sort-Space-Used>
</Sort-Spaces>
</Incremental-Sort-Groups>
Sort-Space is incorrectly finished with /Sort-Spaces

#2Daniel Gustafsson
daniel@yesql.se
In reply to: PG Bug reporting form (#1)
Re: BUG #16683: explain plan format xml produces invalid xml

On 23 Oct 2020, at 12:26, PG Bug reporting form <noreply@postgresql.org> wrote:

Sort-Space is incorrectly finished with /Sort-Spaces

Nice catch, it was introduced in the Incremental Sort patch, both for disk and
memory type sorts as per the attached (unless the opening of the group was
supposed to be "Sort Spaces" but singular seems the right choice here).

cheers ./daniel

Attachments:

explain_sort_space.diffapplication/octet-stream; name=explain_sort_space.diff; x-unix-mode=0644Download+2-2
In reply to: Daniel Gustafsson (#2)
Re: BUG #16683: explain plan format xml produces invalid xml

Thanks a lot for fixing it!

On Fri, Oct 23, 2020 at 1:12 PM Daniel Gustafsson <daniel@yesql.se> wrote:

Show quoted text

On 23 Oct 2020, at 12:26, PG Bug reporting form <noreply@postgresql.org>

wrote:

Sort-Space is incorrectly finished with /Sort-Spaces

Nice catch, it was introduced in the Incremental Sort patch, both for disk
and
memory type sorts as per the attached (unless the opening of the group was
supposed to be "Sort Spaces" but singular seems the right choice here).

cheers ./daniel

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Daniel Gustafsson (#2)
Re: BUG #16683: explain plan format xml produces invalid xml

Daniel Gustafsson <daniel@yesql.se> writes:

On 23 Oct 2020, at 12:26, PG Bug reporting form <noreply@postgresql.org> wrote:
Sort-Space is incorrectly finished with /Sort-Spaces

Nice catch, it was introduced in the Incremental Sort patch, both for disk and
memory type sorts as per the attached (unless the opening of the group was
supposed to be "Sort Spaces" but singular seems the right choice here).

Agreed. Will push in a bit.

regards, tom lane