Re: WIP: Fix invalid XML explain plans for track_io_timing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Markus Winand <markus(dot)winand(at)winand(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: Fix invalid XML explain plans for track_io_timing
Date: 2016-10-20 21:22:21
Message-ID: 12377.1476998541@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Markus Winand <markus(dot)winand(at)winand(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2016-10-20 21:53:42 Re: emergency outage requiring database restart
Previous Message Stephen Frost 2016-10-20 20:42:21 Re: Improve output of BitmapAnd EXPLAIN ANALYZE