Show sizes

table, index, toast and total size per Table
size of each index
This commit is contained in:
eelke 2021-03-10 19:06:40 +01:00
parent d6aeef492d
commit 11459e1e12
17 changed files with 138 additions and 28 deletions

View file

@ -11,7 +11,7 @@ SELECT indexrelid, indrelid, indnatts, indisunique, indisprimary,
indisexclusion, indimmediate, indisclustered, indisvalid,
indcheckxmin, indisready, indislive, indkey,
indcollation, indclass, indoption, indexprs, indpred,
pg_get_indexdef(indexrelid))__";
pg_get_indexdef(indexrelid), pg_total_relation_size(indexrelid))__";
if (minimumVersion(90400))
q += ", indisreplident ";
@ -35,7 +35,7 @@ PgIndex PgIndexContainer::loadElem(const Pgsql::Row &row)
col.getAsVector<Oid>(std::back_inserter(v.collation));
col.getAsVector<Oid>(std::back_inserter(v.indclass));
col.getAsVector<int16_t>(std::back_inserter(v.option));
col >> v.exprs >> v.pred >> v.definition;
col >> v.exprs >> v.pred >> v.definition >> v.sizeBytes;
if (minimumVersion(90400))
col >> v.isreplident;