From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Michael Paquier <michael(at)paquier(dot)xyz>, mathias(at)brossard(dot)org, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: ToDo: show size of partitioned table |
Date: | 2019-04-07 19:13:36 |
Message-ID: | 20190407191336.GA1278@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2019-Apr-07, Pavel Stehule wrote:
> ne 7. 4. 2019 v 20:27 odesílatel Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
> napsal:
> > In order for this to display sanely, I added the "Parent name" column if
> > either the "n" flag is shown or a pattern is given (previously it only
> > appeared in the former case).
>
> I am thinking about it and original behave and this new behave should be
> expected (and unexpected too). We can go this way - I have not
> counter-arguments, but yes, it is more consistent with some other commands,
> pattern disables some other constraints.
>
> It should be documented - Using any pattern in this case forces 'n' flag.
Added to the docs, and pushed.
I couldn't resist tweaking the ORDER BY clause, too. I think listing
all tables first, followed by all indexes, and sorting by parent in each
category, is much easier to read. (Maybe this can use additional
tweaking, but it's a minor thing anyway -- for example putting together
all indexes that correspond to some particular table?)
I noticed that \d never seems to use pg_total_relation_size, so toast
size is never shown. I did likewise here too and used pg_table_size
everywhere. I'm not 100% sure this is the most convenient thing. Maybe
we need yet another column, and/or yet another flag ...?
Also, I think the new \dP should gain a new flag (maybe "l") to make it
list leaf tables/indexes too with their local sizes, and remove those
from the standard \d listing.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Ila B. | 2019-04-07 19:48:07 | Re: [GSoC 2019] Proposal: Develop Performance Farm Database and Website |
Previous Message | Pavel Stehule | 2019-04-07 18:53:21 | Re: ToDo: show size of partitioned table |