From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | pavel(dot)stehule(at)gmail(dot)com, pryzby(at)telsasoft(dot)com, michael(at)paquier(dot)xyz, mathias(at)brossard(dot)org, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: ToDo: show size of partitioned table |
Date: | 2019-04-04 10:41:53 |
Message-ID: | 4566fe69-d40b-4eed-8d66-83d4a30c90b0@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Alvaro,
On 2019/04/03 21:01, Alvaro Herrera wrote:
> On 2019-Apr-03, Kyotaro HORIGUCHI wrote:
>
>> Hello.
>>
>> At Wed, 3 Apr 2019 12:55:06 +0900, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote in <ee892049-0fe4-afe6-cbbf-31cf44fa8522(at)lab(dot)ntt(dot)co(dot)jp>
>>> On 2019/04/03 12:02, Kyotaro HORIGUCHI wrote:
>>>> \dPn doesn't show children because the are of 'r' relkind. And
>>>> \dPn * doesn't show type for children.
>> ...
>>> I think it's intentional that leaf partitions are not shown, because the
>>> patch is meant to allow showing only the "partitioned" members of
>>> partition trees. Regular \d[t|i][+] shows normal tables ('r', 'i', etc.)
>>> including their size, but it's useless for partitioned tables ('P', 'I',
>>> etc.) as far as showing the size is concerned, so the patch. Even \dPn is
>>> meant to only show partitions that are themselves partitioned; note the
>>> "P" in the command.
>>
>> + If the modifier <literal>n</literal> (<quote>nested</quote>) is used,
>> + then non-root partitioned tables are included, and a column is shown
>> + displaying the parent of each partitioned relation.
>>
>> Ah. I see. "non-root *partitined* tables". I misread the
>> phrase. Sorry for the noise.
>
> Well, is this decision an excellent one, from a UI perspective? I was
> surprised by this too and think this should be reconsidered.
>
> I would opt for having \d NOT show partitions at all, myself.
Hmm, in the previous long discussions on this topic, people were opposed
[1] to an idea like this, but maybe they are no longer. Note that the
main opposition came to the idea that \d+ would perform simple
pg_relation_size for regular tables and something else for partitioned
tables, such as, aggregation query over pg_partition_tree.
> When you
> have many partitions (and we're now making the system scale into the
> thousands for a single partitioned table), they clutter the output
> making it unusable. So, rather than think as \dP as "the way to show
> the aggregate size of a partitioned table or index", I'd think it as
> "the way to show detailed info about a partitioned table or index".
> Which includes things like displaying its list of partitions and the
> size of each.
That might be a good idea, but maybe there isn't time left to revise the
proposed patch like that for 12?
Thanks,
Amit
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2019-04-04 10:43:10 | Re: pg_rewind vs superuser |
Previous Message | Masahiko Sawada | 2019-04-04 10:23:32 | Re: [HACKERS] Block level parallel vacuum |