Re: Report planning memory in EXPLAIN ANALYZE

From: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: ams(at)toroid(dot)org, jian he <jian(dot)universality(at)gmail(dot)com>, Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>, Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Report planning memory in EXPLAIN ANALYZE
Date: 2024-01-23 04:46:49
Message-ID: CAExHW5uSXdM5faT2ksjc=ae1=4fqrLwHzc6GC_GRiAmbARDA2g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 18, 2024 at 5:28 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> On 2024-Jan-18, Ashutosh Bapat wrote:
>
> > The EXPLAIN output produces something like below
> > explain_filter
> > ---------------------------------------------------------
> > Seq Scan on int8_tbl i8 (cost=N.N..N.N rows=N width=N)
> > Planning:
> > Memory: used=N bytes, allocated=N bytes
> > (3 rows)
> >
> > but function explain_filter(), defined in explain.sql, removes line
> > containing Planning: and we end up with output
> > explain_filter
> > ---------------------------------------------------------
> > Seq Scan on int8_tbl i8 (cost=N.N..N.N rows=N width=N)
> > Memory: used=N bytes, allocated=N bytes
> > (2 rows)
> >
> > Hence this weird difference.
>
> Ah, okay, that makes sense. (I actually think this is a bit insane, and
> I would hope that we can revert commit eabba4a3eb71 eventually, but I
> don't think that needs to hold up your proposed patch.)
>

Thanks. Attached is rebased and squashed patch.

--
Best Wishes,
Ashutosh Bapat

Attachment Content-Type Size
0001-EXPLAIN-reports-memory-consumed-for-plannin-20240123.patch text/x-patch 19.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2024-01-23 04:51:45 Unnecessary smgropen in {heapam_relation,index}_copy_data?
Previous Message Arne Roland 2024-01-23 04:42:42 Re: Permute underscore separated components of columns before fuzzy matching