public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ashutosh Bapat <[email protected]>
To: Justin Pryzby <[email protected]>
Cc: [email protected]
Cc: David Rowley <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Subject: Re: pgsql: Add EXPLAIN (MEMORY) to report planner memory consumption
Date: Tue, 6 Feb 2024 14:56:31 +0530
Message-ID: <CAExHW5v3EwH6SGwewLwr2aDnJePgHYKooOZuOu0XfoGfjths9A@mail.gmail.com> (raw)
In-Reply-To: <ZcFfeunBiKFGuebP@pryzbyj2023>
References: <[email protected]>
	<ZcFfeunBiKFGuebP@pryzbyj2023>

On Tue, Feb 6, 2024 at 3:51 AM Justin Pryzby <[email protected]> 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/[email protected]
> https://www.postgresql.org/message-id/[email protected]
>
>                                                  "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





view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: pgsql: Add EXPLAIN (MEMORY) to report planner memory consumption
  In-Reply-To: <CAExHW5v3EwH6SGwewLwr2aDnJePgHYKooOZuOu0XfoGfjths9A@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox