Skip to content

Commit

Permalink
db-maintenance.adoc: added AS to a query, PG 13 still cares, 14 does not
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Dec 23, 2021
1 parent 93072b6 commit a0ce47f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/repository/native-postgresql/db-maintenance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ ORDER BY total_bytes DESC;
-- Sizes of audit tables (partitions summed up)
select inhparent::regclass,
pg_size_pretty(sum(pg_total_relation_size(inhrelid))) total,
pg_size_pretty(sum(pg_relation_size(inhrelid))) internal,
pg_size_pretty(sum(pg_table_size(inhrelid) - pg_relation_size(inhrelid))) toast,
pg_size_pretty(sum(pg_indexes_size(inhrelid))) indexes
pg_size_pretty(sum(pg_total_relation_size(inhrelid))) as total,
pg_size_pretty(sum(pg_relation_size(inhrelid))) as internal,
pg_size_pretty(sum(pg_table_size(inhrelid) - pg_relation_size(inhrelid))) as toast,
pg_size_pretty(sum(pg_indexes_size(inhrelid))) as indexes
from pg_inherits i
where exists (select from pg_class c where c.oid = i.inhparent
and c.relname like 'ma_audit_%'
Expand Down

0 comments on commit a0ce47f

Please sign in to comment.