Re: ToDo: show size of partitioned table

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: ToDo: show size of partitioned table
Дата
Msg-id 20190407191336.GA1278@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: ToDo: show size of partitioned table  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: ToDo: show size of partitioned table  (Justin Pryzby <pryzby@telsasoft.com>)
Re: ToDo: show size of partitioned table  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On 2019-Apr-07, Pavel Stehule wrote:

> ne 7. 4. 2019 v 20:27 odesílatel Alvaro Herrera <alvherre@2ndquadrant.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: ToDo: show size of partitioned table
Следующее
От: "Ila B."
Дата:
Сообщение: Re: [GSoC 2019] Proposal: Develop Performance Farm Database andWebsite