pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16683: explain plan format xml produces invalid xml
4+ messages / 4 participants
[nested] [flat]

Commits from this thread:
  2020-10-23 87a174c0e7 e4538708d5  Fix broken XML formatting in EXPLAIN output for incremental sorts.
* BUG #16683: explain plan format xml produces invalid xml
@ 2020-10-23 10:26  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 4+ messages in thread

From: PG Bug reporting form @ 2020-10-23 10:26 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: jal@etc.to

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #16683: explain plan format xml produces invalid xml
@ 2020-10-23 11:12  Daniel Gustafsson <daniel@yesql.se>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 2 replies; 4+ messages in thread

From: Daniel Gustafsson @ 2020-10-23 11:12 UTC (permalink / raw)
  To: jal@etc.to, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>; +Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>

> 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.diff (application/octet-stream, 968B) download diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index 41317f1837..43f9b01e83 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -2827,7 +2827,7 @@ show_incremental_sort_group_info(IncrementalSortGroupInfo *groupInfo, ExplainPropertyInteger("Peak Sort Space Used", "kB", groupInfo->maxMemorySpaceUsed, es); - ExplainCloseGroup("Sort Spaces", memoryName.data, true, es); + ExplainCloseGroup("Sort Space", memoryName.data, true, es); } if (groupInfo->maxDiskSpaceUsed > 0) { @@ -2844,7 +2844,7 @@ show_incremental_sort_group_info(IncrementalSortGroupInfo *groupInfo, ExplainPropertyInteger("Peak Sort Space Used", "kB", groupInfo->maxDiskSpaceUsed, es); - ExplainCloseGroup("Sort Spaces", diskName.data, true, es); + ExplainCloseGroup("Sort Space", diskName.data, true, es); } ExplainCloseGroup("Incremental Sort Groups", groupName.data, true, es);
^ permalink raw reply [nested|flat] 4+ messages in thread

* Re: BUG #16683: explain plan format xml produces invalid xml
@ 2020-10-23 11:38  Frits Jalvingh <jal@etc.to>
  parent: Daniel Gustafsson <daniel@yesql.se>
  1 sibling, 0 replies; 4+ messages in thread

From: Frits Jalvingh @ 2020-10-23 11:38 UTC (permalink / raw)
  To: daniel@yesql.se; +Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>; Tomas Vondra <tomas.vondra@2ndquadrant.com>

Thanks a lot for fixing it!

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

> > 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
>
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #16683: explain plan format xml produces invalid xml
@ 2020-10-23 15:20  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Daniel Gustafsson <daniel@yesql.se>
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2020-10-23 15:20 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: jal@etc.to, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>; Tomas Vondra <tomas.vondra@2ndquadrant.com>

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





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2020-10-23 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-10-23 10:26 BUG #16683: explain plan format xml produces invalid xml PG Bug reporting form <noreply@postgresql.org>
2020-10-23 11:12 ` Daniel Gustafsson <daniel@yesql.se>
2020-10-23 11:38   ` Frits Jalvingh <jal@etc.to>
2020-10-23 15:20   ` Tom Lane <tgl@sss.pgh.pa.us>

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