Re: Report planning memory in EXPLAIN ANALYZE

Поиск
Список
Период
Сортировка
От Ashutosh Bapat
Тема Re: Report planning memory in EXPLAIN ANALYZE
Дата
Msg-id CAExHW5sPU2X7K7h+RX5qfA9gwKSZEFc-QrwVJ56hALBQnYXpiA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Report planning memory in EXPLAIN ANALYZE  (Andy Fan <zhihui.fan1213@gmail.com>)
Ответы Re: Report planning memory in EXPLAIN ANALYZE  (Andy Fan <zhihui.fan1213@gmail.com>)
Список pgsql-hackers
Hi Andy,
Thanks for your feedback.

On Fri, Sep 22, 2023 at 8:22 AM Andy Fan <zhihui.fan1213@gmail.com> wrote:
>
> 1). The commit message of patch 1 just says how it does but doesn't
> say why it does. After reading through the discussion, I suggest making
> it clearer to others.
>
> ...
> After the planning is done, it may still occupy lots of memory which is
> allocated but not pfree-d. All of these memories can't be used in the later
> stage. This patch will report such memory usage in order to making some
> future mistakes can be found in an easier way.
> ...

That's a good summary of how the memory report can be used. Will
include a line about usage in the commit message.

>
> Planning Memory: used=15088 bytes allocated=16384 bytes
>
> Word 'Planning' is kind of a time duration, so the 'used' may be the
> 'used' during the duration or 'used' after the duration. Obviously you
> means the later one but it is not surprising others think it in the other
> way. So I'd like to reword the metrics to:

We report "PLanning Time" hence used "Planning memory". Would
"Planner" be good instead of "Planning"?

>
> Memory Occupied (Now): Parser: 1k Planner: 10k
>
> 'Now' is a cleaner signal that is a time point rather than a time
> duration. 'Parser' and 'Planner' also show a timeline about the
> important time point. At the same time, it cost very little coding
> effort based on patch 01. Different people may have different
> feelings about these words, I just hope I describe the goal clearly.

Parsing happens before planning and that memory is not measured by
this patch. May be separately but it's out of scope of this work.
"used" and "allocated" are MemoryContext terms indicating memory
actually used vs memory allocated.

>
> Personally I am pretty like patch 1, we just need to refactor some words
> to make everything clearer.

Thanks.

--
Best Wishes,
Ashutosh Bapat



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Fix error handling in be_tls_open_server()
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Row pattern recognition