Re: pg_(total_)relation_size and partitioned tables

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: pg_(total_)relation_size and partitioned tables
Дата
Msg-id 93bef1b2-2ed0-c257-158e-efdf5b0ff9dd@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: pg_(total_)relation_size and partitioned tables  (David Rowley <david.rowley@2ndquadrant.com>)
Ответы Re: pg_(total_)relation_size and partitioned tables  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Re: [Sender Address Forgery]Re: pg_(total_)relation_size andpartitioned tables  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
On 12/28/17 16:24, David Rowley wrote:
>> select pg_partition_root(c.oid), c.relname, pg_table_size(c.oid)
>>   from pg_class c
>>   order by 1
>>
>> select pg_partition_root(c.oid), sum(pg_table_size(c.oid))
>>   from pg_class c
>>   group by 1
> 
> That seems much nicer. I assume "root" would mean the top level
> partitioned table. If so, would we also want
> pg_partition_parent(regclass)? Or maybe something to control the
> number of "levels-up" the function would run for. If we had that then
> maybe -1 could mean "go until you find a table with no parent".

Hmm, we need to think through some scenarios for what one would really
want to do with this functionality.

Clearly, the existing behavior is useful for management tasks like bloat
and vacuum monitoring.

And on the other hand you might want to have a logical view of, how big
is this partitioned table altogether.

But what are the uses for dealing with partial partition hierarchies?
How easy do we need to make that?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Devrim Gündüz
Дата:
Сообщение: Re: How to Works with Centos
Следующее
От: "Tels"
Дата:
Сообщение: Re: Faster inserts with mostly-monotonically increasing values