Re: ToDo: show size of partitioned table

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: ToDo: show size of partitioned table
Дата
Msg-id 20181030134854.GA2266@paquier.xyz
обсуждение исходный текст
Ответ на Re: ToDo: show size of partitioned table  (Amit Langote <amitlangote09@gmail.com>)
Список pgsql-hackers
On Tue, Oct 30, 2018 at 09:24:01PM +0900, Amit Langote wrote:
>> It is based on Mathias's patch. Although we can use
>> pg_partition_tree on PostgreSQL, we still should to support
>> PostgreSQL 10, 11 where this function is not available
>
> Ah, I forgot that psql will need to consider 10 and 11 servers too.

+    /* PostgreSQL 11 has pg_partition_tree function */
That's v12 here.

+    appendPQExpBuffer(&buf,
+    ",\n  (SELECT pg_catalog.pg_size_pretty(sum(pg_catalog.pg_table_size("
+    "relid)))\n"
+    "     FROM pg_partition_tree(c.oid)) AS \"%s\""
You need to do schema qualification for functions and relations.
--
Michael

Вложения

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

Предыдущее
От: Sergei Kornilov
Дата:
Сообщение: Re: Continue work on changes to recovery.conf API
Следующее
От: Andreas 'ads' Scherbaum
Дата:
Сообщение: Re: Installation instructions update (pg_ctl)