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

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: [patch] Add schema total size to psql \dn+
Дата
Msg-id CAOBaU_ZfouYfqvt0iCPrgHoOpDn-fCOCH5fPZQT8sxrB86Y5yQ@mail.gmail.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+  (Gilles Darold <gilles.darold@dalibo.com>)
Список pgsql-hackers
On Thu, Feb 21, 2019 at 5:42 PM Gilles Darold <gilles.darold@dalibo.com> wrote:
>
> Le 21/02/2019 à 12:01, Julien Rouhaud a écrit :
> > On Thu, Feb 21, 2019 at 11:49 AM Gilles Darold <gilles.darold@dalibo.com> wrote:
> >>> 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 ?
> >>> [...]
> >>> 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.

I have a few comments about the patch.

You're using pg_class LEFT JOIN pg_namespace while we need INNER JOIN
here AFAICT.  Also, you're using pg_relation_size(), so fsm, vm won't
be accounted for.  You should also be bypassing the size for 8.0-
servers where there's no pg_*_size() functions.


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: list append syntax for postgresql.conf
Следующее
От: Peter Eisentraut
Дата:
Сообщение: psql show URL with help