Re: Report planning memory in EXPLAIN ANALYZE

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
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-18 11:58:05
Message-ID: 202401181158.xolj7dkqla6d@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.)

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"At least to kernel hackers, who really are human, despite occasional
rumors to the contrary" (LWN.net)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andy Fan 2024-01-18 12:00:54 Re: Strange Bitmapset manipulation in DiscreteKnapsack()
Previous Message Alvaro Herrera 2024-01-18 11:46:24 Re: remaining sql/json patches