[patch] Add schema total size to psql \dn+

Поиск
Список
Период
Сортировка
От Gilles Darold
Тема [patch] Add schema total size to psql \dn+
Дата
Msg-id 2d6d2ebf-4dbc-4f74-17d8-05461f4782e2@dalibo.com
обсуждение исходный текст
Ответы Re: [patch] Add schema total size to psql \dn+  (Gilles Darold <gilles.darold@dalibo.com>)
Re: [patch] Add schema total size to psql \dn+  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi all,


When we want to get total size of all relation in a schema we have to
execute one of our favorite DBA query. It  is quite simple but what
about displaying schema size when using \dn+ in psql ?


gilles=# \dn+
                               List of schemas
  Name  |  Owner   |  Access privileges   |  Size   |      Description 
--------+----------+----------------------+---------+------------------------
 public | postgres | postgres=UC/postgres+| 608 kB  | standard public schema
        |          | =UC/postgres         |         |
 test   | gilles   |                      | 57 MB   |
 empty  | gilles   |                      | 0 bytes |
(3 rows)

The attached simple patch adds this feature. Is there any cons adding
this information? The patch tries to be compatible to all PostgreSQL
version. Let me know if I have missed something.


Best regards,

-- 
Gilles Darold
Consultant PostgreSQL
http://dalibo.com - http://dalibo.org


Вложения

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Delay locking partitions during INSERT and UPDATE
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Pluggable Storage - Andres's take