Re: Report planning memory in EXPLAIN ANALYZE
От | Ashutosh Bapat |
---|---|
Тема | Re: Report planning memory in EXPLAIN ANALYZE |
Дата | |
Msg-id | CAExHW5stHDXdRi1_pvNwq5R=qEseBeUxL6_v2ZRT3Pns2K6Jsw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Report planning memory in EXPLAIN ANALYZE (Andrei Lepikhov <a.lepikhov@postgrespro.ru>) |
Ответы |
Re: Report planning memory in EXPLAIN ANALYZE
|
Список | pgsql-hackers |
On Fri, Dec 1, 2023 at 8:27 AM Andrei Lepikhov <a.lepikhov@postgrespro.ru> wrote: > > On 30/11/2023 18:40, Alvaro Herrera wrote: > > Well, SUMMARY is enabled by default with ANALYZE, and I'd rather not > > have planner memory consumption displayed by default with all EXPLAIN > > ANALYZEs. So yeah, I still think this deserves its own option. > > > > But let's hear others' opinions on this point. I'm only one vote here. > > I agree; it should be disabled by default. The fact that memory > consumption outputs with byte precision (very uncomfortable for > perception) is a sign that the primary audience is developers and for > debugging purposes. That's 2 vs 1. Here's patch with MEMORY option added. Replying to Alvaro's earlier relevant comments. > If EXPLAIN (MEMORY) is added, then probably auto_explain needs a > corresponding flag, and doc updates. auto_explain does not implement planner_hook and hence can not gather information about planner's memory usage. So no new flag and doc update to auto_explain. I have added a comment auto_explain.c but probably even that's not needed. We are considering this option only for developers and auto_explain is largely for users. So I didn't feel like adding an implementation of planner_hook in auto_explain and use MEMORY option. If we feel that planner's memory usage report is useful in auto_explain, it should easy to do that in future. > The EXPLAIN docs (explain.sgml) need an update to mention the new flag > and the new output, too. Done. 0001 is as is except explain.out and explain.sgml changes reverted. 0002 following changes. It's a separate patch for ease of review. a. implements MEMORY option, adds tests in explain.sql and also updates explain.sgml. b. show_planning_memory renamed to show_planner_memory to be in sync with the output c. small indentation change by pgindent. -- Best Wishes, Ashutosh Bapat
Вложения
В списке pgsql-hackers по дате отправления: