From: Tatsuo Ishii <ishii@postgresql.org>
To: ashutosh.bapat.oss@gmail.com
Cc: dgrowleyml@gmail.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: Add memory/disk usage for WindowAgg nodes in EXPLAIN
Date: Tue, 09 Jul 2024 15:44:09 +0900 (JST)
Message-ID: <20240709.154409.1091516017393224028.ishii@postgresql.org> (raw)
In-Reply-To: <CAExHW5vV8Ung7wr1s=NhWHAmNaoSetPOO4tHXQgzUe_p7eL57A@mail.gmail.com>
References: <20240709.114412.199303920149670049.ishii@postgresql.org>
<CAApHDvosh7wqu+oMUH8uELFewT-JdUcbonuDQARbtJaxQ4SqKg@mail.gmail.com>
<CAExHW5vV8Ung7wr1s=NhWHAmNaoSetPOO4tHXQgzUe_p7eL57A@mail.gmail.com>
>> Yes, I think so. I'd keep each as a separate patch so they can be
>> considered independently. Doing all of them should hopefully ensure we
>> strike the right balance of what code to put in explain.c and what
>> code to put in tuplestore.c.
> +1
>
> + if (es->format != EXPLAIN_FORMAT_TEXT)
> + {
> + ExplainPropertyText("Storage", storageType, es);
> + ExplainPropertyInteger("Maximum Storage", "kB", spaceUsedKB, es);
> + }
> + else
> + {
> + ExplainIndentText(es);
> + appendStringInfo(es->str,
> + "Storage: %s Maximum Storage: " INT64_FORMAT "kB\n",
> + storageType,
> + spaceUsedKB);
> + }
>
> It will be good to move this code to a function which will be called
> by show_*_info functions().
I have already implemented that in this direction in my working in
progress patch:
/*
* Show information regarding storage method and maximum memory/disk space
* used.
*/
static void
show_storage_info(Tuplestorestate *tupstore, ExplainState *es)
Which can be shared by Material and CTE scan node. I am going to post
it after I take care Recursive Union and Table Function Scan node.
> We might even convert it into a tuplestore
> specific implementation hook after David's work.
Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
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: pgsql-hackers@postgresql.org
Cc: ishii@postgresql.org, ashutosh.bapat.oss@gmail.com, dgrowleyml@gmail.com
Subject: Re: Add memory/disk usage for WindowAgg nodes in EXPLAIN
In-Reply-To: <20240709.154409.1091516017393224028.ishii@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox