select pg_size_pretty(sum(pg_total_relation_size(inhrelid::regclass))) from pg_inherits where inhparent='<schema>.<table>'::regclass; pg_size_pretty ---------------- 4410 GB
Tag: partition
How to find total size of partition table on Postgresql?
To find total size of partition table on Postgresql, one can run following query. Note this show table size only select pg_size_pretty(sum(pg_relation_size(inhrelid::regclass))) from pg_inherits where inhparent='<schema>.<table>'::regclass; pg_size_pretty ---------------- 3810 GB
How to change properties/attributes of partition table?
At times one would want to change properties/attributes of a table so new partitions are affected by change not the partitions already created, like example compression, change PCTFREE, default tablespace. -- enable compression for all operations and change PCTFREE SQL> ALTER TABLE scott.part_table MODIFY DEFAULT ATTRIBUTES COMPRESS FOR ALL OPERATIONS PCTFREE 5; -- Change default … Continue reading How to change properties/attributes of partition table?