Re: Proposals for EXPLAIN: rename ANALYZE to EXECUTE and extend VERBOSE
Michael Christofides <michael@pgmustard.com>
From: Michael Christofides <michael@pgmustard.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Guillaume Lelarge <guillaume@lelarge.info>,
Greg Sabino Mullane <htamfids@gmail.com>, Robert Haas <robertmhaas@gmail.com>,
"David G. Johnston" <david.g.johnston@gmail.com>, Nikolay Samokhvalov <samokhvalov@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>,
pgsql-hackers@postgresql.org
Date: 2024-12-13T15:59:09Z
Lists: pgsql-hackers
> I've pushed the main patch. Woohoo! And thank you. I've already seen quite a lot of positivity around the commit on Twitter[1][2][3]. > I'm not planning on pushing the auto_explain.log_buffers default change unless there's a bit more discussion about it. Much like Guillaume, I'd also be in favour of 0002, but it's nowhere near as important to me. I think most people consider the parameters far more when setting up auto_explain, so I believe far fewer omit buffers by mistake. Also, most cloud providers don't ship with auto_explain on, and the only one I know of that does[4], ships with log_buffers on too. On the plus side, it would be nice to be consistent. But on the downside, it might add a little extra overhead for folks who run auto_explain with log_analyze on, and who opted not to set log_buffers and upgrade without setting it to off explicitly. I am still in favour of the 0002 patch being applied, to avoid confusion and maximise the chance people that don't know about buffers still get them in their plans. > do we also need to update doc/src/sgml/rules.sgml? > https://www.postgresql.org/docs/current/rules-materializedviews.html Good catch. Testing those file_fdw queries locally, I don't see buffers reported by the Foreign Scan, but I do initially see some Planning buffers (on first run). The two plans from the queries on the materialized view do show buffers now though, of course. Since the file_fdw Foreign Scan is not reporting buffers, I'm wondering if in this one case simply changing "With EXPLAIN ANALYZE" to "With EXPLAIN (ANALYZE, BUFFERS OFF)" might be the least confusing solution? Thanks again all, Michael [1]: https://x.com/nori_shinoda/status/1866805465897898319 [2]: https://x.com/samokhvalov/status/1866863468172939457 [3]: https://x.com/mmeent_pg/status/1866796928002044196 [4]: https://www.pgmustard.com/blog/which-cloud-providers-support-auto-explain
Commits
-
Fix further fallout from EXPLAIN ANALYZE BUFFERS change
- 89988ac5891b 18.0 landed
-
Add missing BUFFERS OFF in regression tests, take 2
- 9df2a4b9316f 18.0 landed
-
Add missing BUFFERS OFF in select_into regression tests
- 9fa1aaa6525a 18.0 landed
-
Enable BUFFERS with EXPLAIN ANALYZE by default
- c2a4078ebad7 18.0 landed