Re: BUG #16171: Potential malformed JSON in explain output

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Hamid Akhtar <hamid(dot)akhtar(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16171: Potential malformed JSON in explain output
Date: 2020-02-03 15:56:09
Message-ID: 30719.1580745369@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
> On 1 Feb 2020, at 20:37, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> 0002 attached isn't committable, because nobody would want the overhead
>> in production, but it seems like a good trick to keep up our sleeves.

> Thats a neat trick, I wonder if it would be worth maintaining a curated list of
> these tricks in a README under src/test to help others avoid/reduce wheel
> reinventing?

It occurred to me that as long as this is an uncommittable hack anyway,
we could feed the EXPLAIN data to jsonb_in and then hot-wire the jsonb
code to whine about duplicate keys. So attached, for the archives' sake,
is an improved version that does that. I still don't find any problems
(other than the one we're fixing here); though no doubt if I reverted
100136849 it'd complain about that.

regards, tom lane

Attachment Content-Type Size
0002-check-json-validity-2.patch text/x-diff 2.6 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2020-02-03 16:23:03 Re: BUG #16241: Degraded hash join performance
Previous Message PG Bug reporting form 2020-02-03 15:33:02 BUG #16241: Degraded hash join performance

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2020-02-03 15:59:11 Re: [PoC] Non-volatile WAL buffer
Previous Message Andres Freund 2020-02-03 14:53:01 Re: explain HashAggregate to report bucket and memory stats