Re: WIP: Fix invalid XML explain plans for track_io_timing - Mailing list pgsql-hackers

From Tom Lane
Subject Re: WIP: Fix invalid XML explain plans for track_io_timing
Date
Msg-id 12377.1476998541@sss.pgh.pa.us
Whole thread Raw
In response to Re: WIP: Fix invalid XML explain plans for track_io_timing  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> Markus Winand <markus.winand@winand.at> writes:
>> The XML output of explain potentially outputs the XML tag names "I/O-Write-Time"
>> and "I/O-Read-Time", which are invalid due to the slash.

> Ooops.

After further thought I decided we should go with the whitelist solution.
The extra time needed to produce XML-format output isn't really likely to
bother anyone.  And given that this bug escaped notice for several years,
it seems likely that the next time somebody decides to be creative about
picking a tag name, we might not notice an XML syntax violation for
several more years.  So a future-proof fix seems advisable.

I pushed a patch using the strchr() approach.  Thanks for reporting this!
        regards, tom lane



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Improve output of BitmapAnd EXPLAIN ANALYZE
Next
From: Merlin Moncure
Date:
Subject: Re: emergency outage requiring database restart