Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ivps9-0004bt-Mw for pgsql-hackers@arkaria.postgresql.org; Sun, 26 Jan 2020 21:55:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ivps6-0001ZY-75 for pgsql-hackers@arkaria.postgresql.org; Sun, 26 Jan 2020 21:55:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ivps5-0001ZR-UK for pgsql-hackers@lists.postgresql.org; Sun, 26 Jan 2020 21:55:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ivprz-0006eo-2y for pgsql-hackers@lists.postgresql.org; Sun, 26 Jan 2020 21:55:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 00QLswEE016193; Sun, 26 Jan 2020 16:54:58 -0500 From: Tom Lane To: Andres Freund cc: pgsql-hackers@lists.postgresql.org Subject: Re: EXPLAIN's handling of output-a-field-or-not decisions In-reply-to: <20200126212446.24hul2zl2oxrs37l@alap3.anarazel.de> References: <19416.1580069629@sss.pgh.pa.us> <20200126212446.24hul2zl2oxrs37l@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sun, 26 Jan 2020 13:24:46 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16191.1580075698.1@sss.pgh.pa.us> Date: Sun, 26 Jan 2020 16:54:58 -0500 Message-ID: <16192.1580075698@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2020-01-26 15:13:49 -0500, Tom Lane wrote: >> The other offender is the JIT stuff: it prints if COSTS is on and >> there's some JIT activity to report, and otherwise you get nothing. >> This is OK for text mode but it's bogus for the other formats. >> Since we just rearranged EXPLAIN's JIT output anyway, now seems like >> a good time to fix it. > No objection. I think the current choice really is just about hiding JIT > information in the cases where we display explain output in the > tests. That output can't change depending on the build environment and > settings (it's e.g. hugely useful to force all queries to be JITed for > coverage). Right, but then ... > One concern I do have is that I think we need the overall time for JIT > to be displayed regardless of the JIT option. ... how are you going to square that desire with not breaking the regression tests? >> Another debatable question is whether to print anything in non-JIT >> builds. > Hm. I don't think I have an opinion on this. I can see an argument > either way. After a bit more thought I'm leaning to "print nothing", since as you say tools would have to cope with that anyway if they want to work with old releases. Also, while it's not that hard to print dummy data for JIT even in a non-JIT build, I can imagine some future feature where it *would* be hard. So setting a precedent that we must provide dummy output for unimplemented features could come back to bite us. regards, tom lane