Re: Report planning memory in EXPLAIN ANALYZE - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Report planning memory in EXPLAIN ANALYZE
Date
Msg-id CAExHW5tYAkA2krN828RsF+_2zaPTiA1x+Te3v-DmjQcW01DJCQ@mail.gmail.com
Whole thread Raw
In response to Re: Report planning memory in EXPLAIN ANALYZE  (Andrey Lepikhov <a.lepikhov@postgrespro.ru>)
List pgsql-hackers
On Fri, Aug 11, 2023 at 10:41 AM Andrey Lepikhov
<a.lepikhov@postgrespro.ru> wrote:
> >>
> >
> > This won't just affect planner but every subsystem of PostgreSQL, not
> > just planner, unless we device a new context type for planner.
> >
> > My point is what's relevant here is how much net memory planner asked
> > for. Internally how much memory PostgreSQL allocated seems relevant
> > for the memory context infra as such but not so much for planner
> > alone.
> >
> > If you think that memory allocated is important, I will add both used
> > and (net) allocated memory to EXPLAIN output.
> As a developer, I like having as much internal info in my EXPLAIN as
> possible. But this command is designed mainly for users, not core
> developers. The size of memory allocated usually doesn't make sense for
> users. On the other hand, developers can watch it easily in different
> ways, if needed. So, I vote for the 'memory used' metric only.
>
> The patch looks good, passes the tests.

Thanks Andrey.

David, are you against reporting "memory used"? If you are not against
reporting used memory and still think that memory allocated is worth
reporting, I am fine reporting allocated memory too.

--
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Inconsistent results with libc sorting on Windows
Next
From: Tomas Vondra
Date:
Subject: walsender "wakeup storm" on PG16, likely because of bc971f4025c (Optimize walsender wake up logic using condition variables)