Re: pgsql: Add EXPLAIN (MEMORY) to report planner memory consumption

Поиск
Список
Период
Сортировка
От Ashutosh Bapat
Тема Re: pgsql: Add EXPLAIN (MEMORY) to report planner memory consumption
Дата
Msg-id CAExHW5v3EwH6SGwewLwr2aDnJePgHYKooOZuOu0XfoGfjths9A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Add EXPLAIN (MEMORY) to report planner memory consumption  (Justin Pryzby <pryzby@telsasoft.com>)
Ответы Re: pgsql: Add EXPLAIN (MEMORY) to report planner memory consumption  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
On Tue, Feb 6, 2024 at 3:51 AM Justin Pryzby <pryzby@telsasoft.com> wrote:
>
> Up to now, the explain "  " (two space) format is not mixed with "=".
>
> And, other places which show "Memory" do not use "=".  David will
> remember prior discussions.
> https://www.postgresql.org/message-id/20200402054120.GC14618@telsasoft.com
> https://www.postgresql.org/message-id/20200407042521.GH2228@telsasoft.com
>
>                                                  "Memory: used=%lld bytes  allocated=%lld bytes",
> vs
>                                                  "Buckets: %d (originally %d)  Batches: %d (originally %d)  Memory
Usage:%ldkB\n", 
>

I have used = to be consistent with Buffers usage in the same Planning section.

Are you suggesting that
"Memory: used=%lld bytes allocated=%lld bytes",
should be used instead of
"Memory: used=%lld bytes  allocated=%lld bytes",
Please notice the single vs double space.

I am fine with this.

> There was some discussion about "bytes" - maybe it should instead show
> kB?
>

So EXPLAIN (memory) on a prepared statement may report memory less
than 1kB in which case bytes is a better unit. Planner may consume as
less as few kBs of memory, reporting which in kBs would be lossy.

> (Also, I first thought that "peek" should be "peak", but eventually I
> realized that's it's as intended.)
>

Don't understand the context. But probably it doesn't matter.

--
Best Wishes,
Ashutosh Bapat



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

Предыдущее
От: Richard Guo
Дата:
Сообщение: Re: Properly pathify the union planner
Следующее
От: Ильясов Ян
Дата:
Сообщение: Memory leak fix in rmtree.c