Re: ToDo: show size of partitioned table

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: mathias(at)brossard(dot)org, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: ToDo: show size of partitioned table
Date: 2018-11-05 10:43:16
Message-ID: CAFj8pRD+b_tixkhHjsp5=wqEcFb4AbsH+8AzaDngA44T8eKVtg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

po 5. 11. 2018 v 7:20 odesílatel Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
napsal:

> On 2018/11/04 4:58, Pavel Stehule wrote:
> > here is a patch
>
> Thank you, Pavel.
>
> Here are some comments.
>
> I mentioned it during the last review, but maybe you missed it due to the
> other discussion.
>
> + the pattern are listed. If the form <literal>\dP+</literal>
> + is used, a sum of size of related partitions and a description
> + are also displayed.
>
> + the pattern are listed. If the form <literal>\dPi+</literal>
> + is used, a sum of size of related indexes and a description
> + are also displayed.
>
> + the pattern are listed. If the form <literal>\dPt+</literal>
> + is used, a sum of size of related indexes and a description
> + are also displayed.
>
> I suggest:
>
> "is used, the sum of sizes of related partitions / index partitions /
> table partitions and associated description are also displayed."
>
> Note that I also fixed the typo (indexes -> tables) in the last one.
>
> Also, I wonder if we should mention in the description of \dP+ that the
> displayed size considers the sizes of both the tables and indexes on the
> individual partitions, because in the code, I see pg_total_relation_size
> being used. So, the text should be something like:
>
> "is used, the sum of size of related partitions (including the table and
> indexes, if any) and associated description are also displayed."
>
>
should be fixed now

> Code itself looks to me to be in good shape, except you seem to have also
> missed Michael's comment upthread:
>
> + /* PostgreSQL 11 has pg_partition_tree function */
>
> /* PostgreSQL 12 has pg_partition_tree function */
>

should be fixed too

> Thanks again.
>
> Regards,
> Amit
>
>
Updated patch attached

Regards

Pavel

Attachment Content-Type Size
psql-dP-4.patch text/x-patch 13.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2018-11-05 11:39:35 Re: Undo logs
Previous Message John Naylor 2018-11-05 09:28:17 Re: WIP: Avoid creation of the free space map for small tables