ToDo: show size of partitioned table
| От | Pavel Stehule | 
|---|---|
| Тема | ToDo: show size of partitioned table | 
| Дата | |
| Msg-id | CAFj8pRBB1fJ3Ks6K_9zrg1WixWskE7isegEn4P2mQQiNoO-www@mail.gmail.com обсуждение исходный текст | 
| Ответы | Re: ToDo: show size of partitioned table | 
| Список | pgsql-hackers | 
Hi
postgres=# SELECT count(*) from data;
┌─────────┐
│ count │
╞═════════╡
│ 1000000 │
└─────────┘
(1 row)
┌─────────┐
│ count │
╞═════════╡
│ 1000000 │
└─────────┘
(1 row)
\dt+ can display actual size of partitioned table data - now zero is displayed
postgres=# \dt+ data
List of relations
┌────────┬──────┬───────┬───────┬─────────┬─────────────┐
│ Schema │ Name │ Type │ Owner │ Size │ Description │
╞════════╪══════╪═══════╪═══════╪═════════╪═════════════╡
│ public │ data │ table │ pavel │ 0 bytes │ │
└────────┴──────┴───────┴───────┴─────────┴─────────────┘
(1 row)
List of relations
┌────────┬──────┬───────┬───────┬─────────┬─────────────┐
│ Schema │ Name │ Type │ Owner │ Size │ Description │
╞════════╪══════╪═══════╪═══════╪═════════╪═════════════╡
│ public │ data │ table │ pavel │ 0 bytes │ │
└────────┴──────┴───────┴───────┴─────────┴─────────────┘
(1 row)
postgres=# \dt+ data*
List of relations
┌────────┬────────────┬───────┬───────┬─────────┬─────────────┐
│ Schema │ Name │ Type │ Owner │ Size │ Description │
╞════════╪════════════╪═══════╪═══════╪═════════╪═════════════╡
│ public │ data │ table │ pavel │ 0 bytes │ │
│ public │ data_2016 │ table │ pavel │ 17 MB │ │
│ public │ data_2017 │ table │ pavel │ 17 MB │ │
│ public │ data_other │ table │ pavel │ 8224 kB │ │
└────────┴────────────┴───────┴───────┴─────────┴─────────────┘
(4 rows)
List of relations
┌────────┬────────────┬───────┬───────┬─────────┬─────────────┐
│ Schema │ Name │ Type │ Owner │ Size │ Description │
╞════════╪════════════╪═══════╪═══════╪═════════╪═════════════╡
│ public │ data │ table │ pavel │ 0 bytes │ │
│ public │ data_2016 │ table │ pavel │ 17 MB │ │
│ public │ data_2017 │ table │ pavel │ 17 MB │ │
│ public │ data_other │ table │ pavel │ 8224 kB │ │
└────────┴────────────┴───────┴───────┴─────────┴─────────────┘
(4 rows)
or we can introduce some option for display only partitioned tables without partitions.
Regards
Pavel
В списке pgsql-hackers по дате отправления: