Re: ToDo: show size of partitioned table

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(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-08 03:59:10
Message-ID: CAFj8pRBfpDHwLTkbQSFO44BLaE29qBaxCTsKJzi0r2Lmp4H39A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

ne 7. 4. 2019 v 21:13 odesílatel Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
napsal:

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

Thank you very much

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

I prefer some flag - both raw size and total size has sense, but another
column will be less readable

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

+1

Pavel

>
> --
> Álvaro Herrera https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nagaura, Ryohei 2019-04-08 04:32:34 RE: Timeout parameters
Previous Message Tsunakawa, Takayuki 2019-04-08 03:56:52 RE: reloption to prevent VACUUM from truncating empty pages at the end of relation